This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

radio_state function

Defined in /init/custom_helpers.php, lines 189-192
Author LemonStand eCommerce Inc.
string function radio_state(boolean $value)
$value boolean specifies a current radio button value.
{return} string returns checked="checked" string or empty string.
Returns checked="checked" string if the parameter value is TRUE. Use the radio_state() function for programming radio buttons. The following code creates two radio button elements for selecting a color.
<input name="color" <?= radio_state(post('color') == 'red') ?> value="red" type="checkbox"/>
<input name="color" <?= radio_state(post('color') == 'blue') ?> value="blue" type="checkbox"/>