Forum

Thread tagged as: Question

Assign checkbox a default value

If I am using a checkbox like this in my template:

<perch:content type="checkbox" id="show" value="Yes" label="Show on Website?" />

can I assign a tag attribute default value using default = "No"?

I can see this in the docs for text fieldtype but does it work with checkbox?

Clive Walker

Clive Walker 22 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Checkboxes only have one value - that of the value attribute - or no value at all. You can't give them a different value.