checkbox(name = "", value = nil, checked = nil)
Instance Public methods
Generate a Checkbox Input element as a string.
The attributes of the element can be specified as three arguments,
name
, value
, and checked
.
checked
is a boolean value; if true, the CHECKED attribute
will be included in the element.
Alternatively, the attributes can be specified as a hash.
1 2 3 4 5 6 7 8 | checkbox( "name" ) # = checkbox("NAME" => "name") checkbox( "name" , "value" ) # = checkbox("NAME" => "name", "VALUE" => "value") checkbox( "name" , "value" , true ) # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true) |
Please login to continue.