[development] Array of fields on an admin settings form

Jeff Greenberg jeff at ayendesigns.com
Fri Apr 30 18:28:01 UTC 2010

Ignore the code in the first message. I've boiled down the problem to 
this:  If the array of values I'm populating my select with is 
$myarray('apple','orange') and a select box should have 'orange' 
selected when I paint the form, '#default_value' => 'orange'   or 
'#default_value' => 1, neither cause the value showing in the select to 
be other than the no-selection value.

On 4/30/2010 12:57 PM, Jeff Greenberg wrote:
> Hi. I have an admin settings form that contains an array of select 
> fields. The problem is that when submitted, the values don't end up in 
> the db and are the select fields go back to having no selected value. 
> The form was working fine as checkboxes, but when the need arose for 
> each label value to have multiple values to choose from (instead of 
> on/off) and I made it an array of fields, as below, it stopped working.

More information about the development mailing list