So apparently you can call theme functions to format your theme items:
$form $form['contact']['phone_no'] = array(
'#theme' => 'divs_inline',
'#type' => 'textfield',
'#title' => t('Phone Number'),
'#description' => '10 digits, including the area code.',
'#size' => 15,
);
and then the theme function:
function theme_divs_inline($form) {
return '<div class="divs-inline">'. form_render($form) .'</div>';
}
Or at least that's my understanding of how to use it. The problem being that the form item is not actually printed to screen, But the '
' gets printed so the function is being called.
Further testing indicates that you can do something like:
<?php
$form['cc']['expiry'] = array(
'#theme' => 'children_inline',
);
$form['cc']['expiry']['ccmonth'] = array(
'#type' => 'textfield',
'#title' => t('Exp. Date'),
'#required' => TRUE,
'#maxlength' => 2,
'#size' => 2,
'#attributes' => array(
'onKeyPress' => 'return numbersonly(this, event)',
'onChange' => 'validateCCmonth();'
),
);
$form['cc']['expiry']['ccyear'] = array(
'#type' => 'textfield',
'#description' => t('(mm/yy)'),
'#required' => TRUE,
'#maxlength' => 2,