Adds a setting to hide a required controlled field when there is only one option in the select list. Only tested with a text field at this stage.
| Comment | File | Size | Author |
|---|---|---|---|
| dependent_fields-hide_single.patch | 5.34 KB | imclean |
Adds a setting to hide a required controlled field when there is only one option in the select list. Only tested with a text field at this stage.
| Comment | File | Size | Author |
|---|---|---|---|
| dependent_fields-hide_single.patch | 5.34 KB | imclean |
Comments
Comment #1
smoothify commentedThanks for the patch.
I like the idea of this option, I wonder, however, if it would be good to display a visual indication that this item has automatically been selected.
Comment #2
imclean commentedGood idea, that could be an option as well. For our current use we'd like to not show anything to the user if they don't have to choose. Although, simply disabling the option would show the option which has been selected.
Comment #3
imclean commentedOk this patch doesn't quite work, presumably because a select field can't be changed to a hidden (straight text) field and be expected to pass on the value in the correct format.
Will keep at it, any suggestions welcome.
Comment #4
inferno_msk commentedI can not properly configure the module. can not do so when you click a dropdown list with a choice of values.
Use the field - the category.
Comment #5
imclean commentedHiding it via CSS is what we've gone with. I've done this using a custom module but it could potentially be included in Dependent Fields (taking #1 into account).
An additional option "Not sure" is offered when there's more than one option to present to the user.
Comment #6
smoothify commentedI've moved on from Drupal Development work now, and so unfortunately i need to abandon this module. If anyone is interested on reviving it, please let me know through my contact form.