[html-formfu] How to handle checkboxes
Dermot
paikkos at googlemail.com
Wed Aug 27 13:19:20 BST 2008
Hi,
As a first post I would like to say what a great framework FormFu is.
I have a feeling my first question is not the smartest to ask but here goes.
My form has a series of checkboxs that correspond to true/false fields.
I am doing this to
if ($c->model->{val} == 1) {
$box->attributes->{checked} = 'true';
}
This gives me a source like this
<label>Has type</label>
<input name="hastype" type="checkbox" checked="true" />
My query is whether this is correct HTML (4)?
I had a look at the WC3 site and I think checked is an attribute but I
thought I should be getting a source like
<input name="hastype" type="checkbox" checked />
Am I using the right methods?
Thanx,
Dp.
More information about the HTML-FormFu
mailing list