check()

Create checkbox. The form's controls will be buffered and displayed upon calling the display() method.

string check( string field [, string label [, bool default = false [, bool valid = true [, int usage = 1 [, string value ]]]]])

Return

Buffers and returns HTML code.

Parameter
Description
fieldInput field name
labelInput field caption
defaultThe default value will be used if the form has not been sent. With checkboxes the default value can be either TRUE or FALSE.
validExpression that results in TRUE/FALSE
usage0=store
1=require+store
2=require
valueManually overwrite or reset the control's value (even if the form has been sent!)

Create checkbox

$FORM->check("testfield", "Check Me")
RETURN: '<div id="frm_testform_outer_testfield" class="frm_testform div_outer div_check testfield"> <input type="checkbox" class="opt_input testfield" name="testfield[]" id="frm_testform_testfield" value="true" /><label for="frm_testform_testfield" ...