You appear to be a bot. Output may be restricted
Description
Display a group of radio buttons
Usage
BW_::bw_radio( $name, $text, $values, $labels, $class, $extras );
Parameters
- $name
- ( string ) required – the name of the group
- $text
- ( string ) required – the title for the radio button group
- $values
- ( array ) required – array of $id => $value – one for each button in the group
- $labels
- ( array ) required – array of of $id => $label – one for each button in the group
- $class
- ( string ) optional – CSS class names e.g. "star"
- $extras
- ( array ) optional – sparse array of $id -> $extra where $id matches the key of the $value array and $extra are any additional key=value parameters. This is where the "selected" radio button is defined
Returns
voidSource
File name: oik-bwtrace/libs/class-BW-.phpLines:
1 to 15 of 15
static function bw_radio( $name, $text, $values, $labels, $class=null, $extras=null ) { $iradios = null; foreach ( $values as $id => $value ) { $label = bw_array_get( $labels, $id, $value ); $extra = bw_array_get( $extras, $id, null ); $iradios .= BW_::label( $name, $label ); $iradios .= iradio( $name, $id, $value, $class, $extra ); } $lab = BW_::label( $name, $text ); if ( self::is_table() ) { bw_tablerow(array($lab, $iradios)); } else { bw_gridrow(array($lab, $iradios), $class); } }View on GitHub View on Trac