Hello,
I am using the latest version of Webform 6.x-3.6 and Select (or other) 6.x-2.4
On a basic webform node, I created a multiple select field (required) with 5 options and a select (or other) enabled.
There is another file upload field that is required.
If I submit the form with all of the options checked off in the first multiple select field but forget to upload a file (failed mandatory verification) then I am returned to the form with all of my select options retained except for the first select option (key 0) of the multiple select field.
This is consistent on all webforms created with the other field enabled via select (or other).
The expected behavior is that all selections are retained (including the first selection option of key 0).
-Chris
Comment | File | Size | Author |
---|---|---|---|
#3 | select_or_other_checkboxes.patch | 2.67 KB | quicksketch |
Comments
Comment #1
danielb CreditAttribution: danielb commentedAssigning to Webform 6.x-3.6.
If there is anything Select (or other) must change to accommodate a fix, please let me know.
Comment #2
quicksketchI've tried to reproduce this issue on the latest CVS versions of Webform and Select or Other... and it does indeed seem that this problem only occurs with Select or Other. Most likely the Select or Other form element doesn't properly handle checkboxes that have a value of "0" (which isn't surprising since this is a super-tweaky problem to solve correctly). I'll see if I can figure out what causes this and submit a patch, my guess is that this probably isn't specific to Webform at all, but affects everywhere Select or Other is used as checkboxes with a return value of "0".
Comment #3
quicksketchHere's a patch that includes the same collection of modifications Webform includes to make it so that Select or Other can handle checkboxes with a "value" property of "0". Drupal core is super-glitchy in this regard.
Comment #4
danielb CreditAttribution: danielb commentedawesome quicksketch, thanks for that!
Comment #5
danielb CreditAttribution: danielb commentedcommitted, will appear in next dev snapshot