With webform_image_select not entering anything for Image value or Image text results in all options but one being overwritten.
How to reproduce
* add a webform_image_select element
* enter/select two images, no value or text
* save
* re-edit the element: only one option (I think the second/last) is saved
Proposal for solutions:
* either the value/text ought to be required
* or the value gets set automatically if missing (e.g. 1,2,..)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3009833-7-rc21.patch | 3.89 KB | miiimooo |
| #3 | 3009833-3.patch | 5.25 KB | jrockowitz |
| #2 | webform_image_select-empty_value_text-3009833-2.patch | 1.08 KB | miiimooo |
Comments
Comment #2
miiimoooA first stab at this..
Comment #3
jrockowitz commentedThe attached patch fixes the issue with is the multiple element's unique key validation is completely ignoring empty keys.
Comment #5
jrockowitz commentedI committed the patch. Please download the latest dev release to review.
Comment #6
miiimoooI can confirm that leaving the value/text empty now sets a form error.
Thanks @jrockowitz for fixing this so quickly!
Comment #7
miiimoooNot sure this is something you want but I've re-rolled the patched for rc21 since dev had some stuff I didn't want (yet).
Hope it's useful for someone else.