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.
In Webform grid elements, the radio button for specifying the default value appears for both options and questions, though it does nothing for either. Since defaults cannot be set, the radio button should not appear.
There is a feature request in Webform to make it possible to set a default option for grid components: #1534788: Allow default values for Grid components
Comment | File | Size | Author |
---|---|---|---|
#2 | webform_grid_no_default_1662892.patch | 919 bytes | Liam Morland |
Comments
Comment #1
quicksketchThanks Liam. I believe Options Element has an option for whether a default value should be able to be provided or not. We should check that we're A) using this option and B) Options Element is properly respecting the setting. Looks like the property is called #default_value_allowed, and it should be set to FALSE.
Comment #2
Liam MorlandThis patch to Webform adds #default_value_allowed = FALSE, hiding the default radio buttons.
Comment #3
quicksketchThanks, committed to 6.x-3.x, 7.x-3.x, and 7.x-4.x, all of which had the problem.