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

checkbox_state function

Defined in /init/custom_helpers.php, lines 168-171
Author LemonStand eCommerce Inc.
string function checkbox_state(boolean $value)
$value boolean specifies a current checkbox state.
{return} string returns checked="checked" string or empty string.
Returns checked="checked" string if the parameter value is TRUE. Use this function to program form checkboxes. The following code example creates a checkbox with name "extra_option". The checkbox is automatically checked if the POST array contains 'extra_option' element and its value is TRUE.
<input name="extra_option" <?= checkbox_state(post('extra_option')) ?> value="1" type="checkbox"/>