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 i create a non-required text field configured as radio buttons or a select field and give it a list of allowed values like this:
si|Yes
|No
dunno|Maybe
what i end up seeing as the label for the blank value is "N/A" or "-None-", instead of "No"
this may look like #368771: Create Documentation about removing N/A option for not required radio buttons but i think it's a different and much smaller issue. just swapping the empty choice created in the optionwidgets module with the $options field fixes it: from
$options = array('' => theme('optionwidgets_none', $field)) + $options;
to
$options = $options + array('' => theme('optionwidgets_none', $field));
Comment | File | Size | Author |
---|---|---|---|
optionwidgets.blank_.patch | 972 bytes | brad.bulger |
Comments
Comment #1
roball CreditAttribution: roball commentedYou could use the CCK Single Select module for customizing/adding non-value options to single-value select lists.
Comment #2
brad.bulger CreditAttribution: brad.bulger commentedinstalling an entire module instead of changing a single line of code is not what i would call "fixed"... in any case, it's somewhat moot now, as 7.x has a similiar but different problem.