|
|
Home API Reference mosHTML::yesnoRadioList |
| mosHTML::yesnoRadioList |
|
|
|
|
Last reviewed: Not reviewed mosHTML::yesnoRadioListA convenient method of building an HTML radio list consisting of just a 'yes' button and a 'no' button. The words for 'yes' and 'no' are taken from the current language settings. The HTML field will return a '0' is the user selects 'no' or '1' if the user selects 'yes'. Syntaxstring yesnoRadioList ( string $tag_name, string $tag_attribs, mixed $selected [, string $yes [, string $no ]] )
ExamplesExample 1: A simple yes/no radio button field with 'No' selected by default. // A simple yes/no radio button field. $html = mosHTML::yesnoRadioList( 'myswitch', 'class="inputbox"', '0' ); echo $html; which produces: <input type="radio" name="myswitch" value="0" checked="checked" class="inputbox" />No <input type="radio" name="myswitch" value="1" class="inputbox" />Yes which renders as: Example 2: A radio button field for 'On' or 'Off' selection with 'On' selected by default. // An on/off radio button field. $html = mosHTML::yesnoRadioList( 'myswitch', 'class="inputbox"', '1', 'On', 'Off' ); echo $html; which produces: <input type="radio" name="myswitch" value="0" class="inputbox" />Off <input type="radio" name="myswitch" value="1" checked="checked" class="inputbox" />On which renders as: Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Saturday, 03 September 2005 ) |
| < Prev | Next > |
|---|





