Dashboard > RAIV > ... > Form API > Radio
RAIV Log In   View a printable version of the current page.
Radio
Added by Alex Buchanan, last edited by Ryan Neill on Aug 23, 2007  (view change)
Labels: 
(None)

Params

  • text
    • Format:  string
    • Description:  radio button text 

Example

$elements['test_radio'] = array('type' => 'radio',
                                'label' => 'Test radio',
                                'text' => 'foo');

To set a radio button as checked in the constructor use:

$elements['test_radio'] = array('type' => 'radio',
                                'label' => 'Test radio',
                                'text' => 'foo',
                                'attribs' => array('checked' => null));

We realize this doesn't make a bit of sense but you will just have to live with it....
AHHHHHHHHHHHHH!!!!

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.7 Build:#524 Jul 28, 2006) - Bug/feature request - Contact Administrators