Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Apr 2012 at 03:13 UTC
Updated:
9 Jul 2014 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchGrid components don't have any ability to set default values at all, so I'm not sure exactly what you're describing. I'm moving this to a feature request if that's what you're wanting.
Comment #2
liam morlandWhen options_element is installed, there is a radio button which looks like it ought to set the default value for grid components, but it does nothing. This radio button should not appear for the questions in any case. For the options, it should set the default option.
This current issue is about adding the ability to set default options. This issue in the options_element queue is about removing the ineffective radio buttons: #1662892: Default value radio should not appear for Webform grid elements
Comment #3
rickiellen commentedDon't we need to be able to set a default value for radio options in a grid?
I am seeing errors otherwise, and found this relevant issue: ...receiving the "An illegal choice has been detected. Please contact the site administrator." error every time a form is submitted that has radio buttons that are not required and have no default.
A detailed description of our issue can be found in the Webform Issue queue at http://drupal.org/node/1565696
Comment #4
liam morlandThis issue is a feature request for adding a default option for grid elements.
I am not seeing the "An illegal choice" messages. In any case, the issue for that is #1565696: Select Component non-mandatory with no default throws "An illegal choice has been detected." .
Comment #5
jastraat commentedI would like to second this feature request. It's nice to be able to offer a N/A default option on grid elements.
Comment #7
danchadwick commentedAdded a default value to grid options list. Supports optional options_element module for advanced UI editing of key|value pairs.
Due to the awesomeness of how quicksketch only stores component options that aren't the default, no upgrade is needed. The default is simply no default.
Committed to 7.x-4.x and 8.x.
Comment #9
danchadwick commentedDarn it. Commits mentioned in #8 have the completely wrong message due to a copy/paste error when I was making them. They are not for this issue. They are for:
#2207047: Unable to deselect in grid blocks form submission
The only way I can fix this would be to reverse them for this issue and re-patch for the correct one. However, since these two issues are somewhat similar, I've elected to just document it here.
Comment #11
danchadwick commentedAnd double-darn-it. The above commit b6e6275 is for #2291843: next_serial needs default value.
Comment #12
danchadwick commentedAlas, there was a bug in defaulting with certain keys. That it worked at all was do to PHP automatic type coercion. The default value must be expanded into an array of defaults, one for each question, in _webform_render_grid.