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?
Comments
Comment #1
dgastudio commentedComment #2
danielb commentedFirstly, 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?
Comment #3
dgastudio commentedafer 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?
Comment #4
danielb commentedI 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.
Comment #5
dgastudio commentedok, thanks. i have changed the project to Webform.
Comment #6
dgastudio commentedand, i'm using webform 6.x-3.4.
in few moments i'll try to update to last stable version.
Comment #7
dgastudio commentedsame problem with last stable version of webform.
Comment #8
dgastudio commentedComment #9
dgastudio commentedand, 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.
Comment #10
quicksketchThe patch in #966028: warning: Illegal offset type in isset or empty when using "Save draft" button with Select or Other... has corrected this issue.
Comment #11
quicksketch