Combination of textfields and checkboxes in a custom form 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-&gt;sku] = array (
    '#type' =&gt; 'fieldset',
    '#attributes' =&gt; array('class' =&gt; array('container-inline')), 
  );
  $form[$meal_type-&gt;sku]['meal'] = array (
    '#type' =&gt; 'checkbox',
    '#title' =&gt; $meal_type-&gt;title,
    '#return_value' =&gt; $meal_type-&gt;sku,
  );
  $form[$meal_type-&gt;sku]['quantity'] = array (
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; 1,
    '#size' =&gt; 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!
I ended up using a '#type' =&gt; 'container' instead of fieldset. And I used #prefix and #suffix in the children to add specific classes for spans and horizontal alignment etc. 

One other thing that seemed useful but I ended up not using: template files for form theming. This is a very useful tutorial: 

http://themery.com/dgd7/advanced-theming/forms/with-templates