I need to create a custom form that contains a list of checkboxes and textfields next to each other, as in:
There are many meal items in the list. Right now I'm using something like:
$form[$meal_type->sku] = array (
'#type' => 'fieldset',
'#attributes' => array('class' => array('container-inline')),
);
$form[$meal_type->sku]['meal'] = array (
'#type' => 'checkbox',
'#title' => $meal_type->title,
'#return_value' => $meal_type->sku,
);
$form[$meal_type->sku]['quantity'] = array (
'#type' => 'textfield',
'#default_value' => 1,
'#size' => 5,
);
This creates an individual fieldset for each meal item and quantity. I just wanted to see if there are any suggestions for a better approach. Thanks!