Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the user selects the Other option, and enters one of the specified known values, the value should be saved as if the user selected that value in the fist place. For example. If you have the following select:
home|Home
mobile|Mobile
Other
If the user selects 'Other' and enters 'mobile' in the other box, currently the result is presented as select like so:
home|Home
mobile|Mobile
> Other => 'mobile'
Where it would make a lot more sense if it were more like:
home|Home
> mobile|Mobile
Other
Comment | File | Size | Author |
---|---|---|---|
#5 | other_text_should_save-1818876-5.patch | 8.74 KB | legolasbo |
Comments
Comment #1
drewschmaltz CreditAttribution: drewschmaltz commentedAgreed, I'll look at how this might be possible. Has anyone else solved this?
Comment #2
joco_sp CreditAttribution: joco_sp commentedThis would be great :)
Comment #3
legolasboI'm unsure wether to qualify this as a feature request or a bug report. Either way I think this is important to fix/implement. Moving the issue to the 7.x-3.x-dev branch because (custom) modules might be expecting this behaviour in the 7.x-2.x branch.
Comment #4
legolasboThis should fix the problem.
I will also write tests.
Comment #5
legolasboWhile writing tests I encountered an bug in my earlier refactoring. Attached patch fixes this bug and adds tests for Select or Other's default behaviour. Still have to write the tests for the feature implemented in this issue.
Comment #7
legolasbo