Trying to do the following on a form :
This is a label: __Text Field 1___ __Text Field 2___ __Text Field 3___
This is a radio label: <x> Yes < > No
This is another radio label: < > Yes <x> No
so the labels line up flush right and the fields flush left. The approach I have taken with the text fields works well - wrap the text fields in a <div> using a separate field element (could have used prefix on the first field and suffix on the last - but same difference) and then using CSS to control the div. Can not seem to figure out how to do this with the radio buttons however - the following issues arise:
- Radios treat the label and each of the buttons as three separate elements. So I can not figure out how to "group" the buttons by themselves so I can apply the CSS.
- Using Radio I have had lots of issues like - how to give each radio the same name so they behave correctly as a set of "or" buttons and do not see how to apply "checked" attribute etc.
Here's the form declaration -
$form['NameAddressQSet']['AddressQ'] = array(
'#type' => 'radios',
'#title' => t('Have you changed your address since the last time you registered?'),
'#options' => array('yes' => t('Yes'), 'no' => t('No')),
'#attributes' => array('onClick' => 'CheckState()'),
'#default_value' => ( isset($node->ChangedAddress) && ($node->ChangedAddress == 'yes') ) ? 1 : 0,
);
Thanks,
drob