Blood Test Enabled?

Why is the checkbox placed on

I have a checkbox:

<label for="TBMasterProduct.BloodTestEnabled">Blood Test Enabled?</label>
<input type="checkbox" name="TBMasterProduct.BloodTestEnabled" id="TBMasterProduct_BloodTestEnabled" class="cb" />

When I submit a form submitting the value 'on' to TBMasterProduct.BloodTestEnabled

Why is the value of checkbox worth it? Of course this should be true / false

+3
source share
3 answers

Why check the box in the column?

Browsers have a default value onunless you set it explicitly with an attribute value.

At the time this answer was written, it was a non-standard error recovery. In HTML 4, the attribute is value required for checkboxes . HTML 5 makes the attribute optional by defaulton .

Of course this should be true / false

. (, , ), , , .

, . , .

+11

"", .

+2

, true/false.

. , .

- , value. , "on".

+2

All Articles