input type=radio, radio button group


Radio buttons like these:

The labels ('yes', 'no', 'maybe') for the buttons are automatically equipped with the <label> tag, that's why you may also click on the labels and not just the controls themselves.


= Array(

'type'           => 'inputRadio',
'displayname'    => 'This is a static radio button collection',
'values'         => Array( 
=> 'zero',
=> 'one',
=> 'two',
=> 'more'
'value'          => '0',

// layout: the container for the entire radio group
'layout'         => '%s',

// itemlayout: the layout of a radio row
'itemlayout'     => '%radio% %label%\n',

// divider settings: to create multiple columns
'divide'         => 5// default: null
'divider'        => '</td><td>'// default: '', see example!

'html'           => 'class="inputfieldstyle"',
'help'           => 'validation failed for this element',
'rowlayout'      => '...%element% %prefix% %postfix% etc...',
'prefix'         => 'string to display before element',
'postfix'        => 'string to display after element',
'readonly'       => 0,
'display'        => 0



Live examples:

Validators to use together with this element:

form validation for developers!

clonefish is a proven, mature form generator class that helps PHP developers to create, validate and process secure, flexible and easy-to-maintain forms
learn more
Bookmark and Share