Hi!

i created a new multistep webform. Step one, list of checkboxes with SELECT (or other). Step two, the same.

after select any option from step one, go to step 2, back to step one and go to step 2 again:

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/u2911/domains/o**********/sites/all/modules/select_or_other/select_or_other.module on line 129.

why?

CommentFileSizeAuthor
#8 error.jpg39.72 KBdgastudio
#8 step_2_back.jpg11.09 KBdgastudio
#8 step1.jpg7.88 KBdgastudio
#8 step2.jpg10.97 KBdgastudio

Comments

dgastudio’s picture

Priority: Normal » Major
danielb’s picture

Firstly, this may be affected by webform's integration with this module, which I know little about. Considering the bug appears specifically for multistep forms, it may have something to do with that.

The reason that error appears, purely from a code perspective, is that there is a default value passed to the field which is not 0, NULL, FALSE, an integer, or a string. It's something else..... what is it?

dgastudio’s picture

afer back from step 2 to step one, and go again to step 2, in SELECT (or other) input appear "Array".

or if i type for example "test" in step 2, go back to step 1 and again to step 2, in input appear "Array test"

please, any quick solution for this?

danielb’s picture

I don't think there is an easy answer to this, I tried to recreate it and I don't get that problem, however the 'other' text keeps prepending "select_or_other, " each time I go back and then forward again, and if I change my selection to a pre-existing choice and go back and then forward again, it brings back the 'other' field with all the old values.

Doing a little debugging, I notice that when you don't use the 'other' text (just choose an existing value), and go back and then forward again, there is an additional empty value passed to default values.

If you do use the 'other' text, the first default value is "select_or_other" and then a second default value which contains all the text (including multiple delimited values) from the other field, which explains where the mystery option appeared for me.

But I can't explain why you are getting an array nested as a value in the array of default values. Perhaps we're using a different version of webform.

I don't have the net at home at the moment so it might take me time to get around to figuring out how it works.

If you like you can post this on the webform issue queue, or change the Project of this issue to 'webform' and change the Version of this issue to the version of webform that you are using. Quicksketch might have an inkling about this.

dgastudio’s picture

Title: Multistep Webform » Multistep Webform problem (Select (or other))
Project: Select (or other) » Webform

ok, thanks. i have changed the project to Webform.

dgastudio’s picture

and, i'm using webform 6.x-3.4.

in few moments i'll try to update to last stable version.

dgastudio’s picture

same problem with last stable version of webform.

dgastudio’s picture

StatusFileSize
new10.97 KB
new7.88 KB
new11.09 KB
new39.72 KB
dgastudio’s picture

and, in my case:

after select some options in step 2, back to step 1 and go again to step 2, the selected options in step 2 are loosed.

quicksketch’s picture

Title: Multistep Webform problem (Select (or other)) » Going "Back" then "Next" looses Select or Other values
Version: 6.x-2.6 » 6.x-3.9
quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.