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.
i have a text.module select list widget for a field. the field is not required, which means that there is a blank space above the list of accepted values. if a node already has a value set for this field, though, i cannot set the value back to null. i can switch between accepted values just fine.
sorry if this is unclear
Comments
Comment #1
jyamada1 CreditAttribution: jyamada1 commentedComment #2
jyamada1 CreditAttribution: jyamada1 commentedok, figured this one out.
turns out that the accepted values list needs to have a null value there in order to accept a null value. this is only quasi-intuitive in that the actual behavior should probably be that the blank line in a non-required field should be able to set the field null again. at least a note of this should be made in the help text of the accepted values list.
Comment #3
mfredrickson CreditAttribution: mfredrickson commentedI can reproduce this bug, and I think it is a bug, not a feature request/documentation shortcoming.
The widget should handle dropping in the NULL option, users should not have to add a line with just a pipe character. Far too subtle.
Comment #4
yched CreditAttribution: yched commentedIndeed - should be fixed now (all branches)
Thanks for reporting
Comment #5
(not verified) CreditAttribution: commented