input type=radio, sql database radio button group
inputRadioDynamic
Identical to inputRadio, but taking its options not only from the 'value' field, but also from the results of a database query.
- Live examples:
- Definition:
<?php $config = Array( 'id' => Array( 'type' => 'inputRadioDynamic', 'displayname' => 'This is a dynamic radio button collection', // first field is the option value, second is the displayed // option text, field names do not count 'sql' => 'SELECT id, name FROM categories', 'values' => Array( 0 => 'choose nothing' ), 'value' => '0', 'html' => 'CLASS="inputfieldstyle"', 'layout' => '%s', 'itemlayout' => '%radio% %label%', ) ); ?> - Possible validators:
- 'required'
- 'custom'
