Blog Sections Open
Working with Checkbox Inputs in eForm
Checkboxes in eForm need explicit handling because an unchecked box sends nothing, while a checked one sends a value that still must pass validation.
Checkbox fields often confuse first-time eForm users because the field behaves differently from text inputs. When the box is not checked, the browser usually sends no value at all. When it is checked, eForm still needs a valid expected value.
Basic field
<input type="checkbox" name="daysback" />
Why validation fails
If the form validator expects a normal scalar value every time, the checkbox can trigger an “invalid value” error whether it is checked or not. The solution is to define the accepted checked value and treat the unchecked state as optional or empty.
Recommendation
Always decide what value the checkbox should submit when checked, then configure the form rules around that exact expectation instead of treating it like a text field.
Tracking Resource Views in a TV and Sorting Ditto by That Value
If you want “most viewed” listings in Evolution CMS, one practical approach is to store hits in a TV and sort the output by that saved value later.
Wrapping Every Three Ditto Items for a Carousel Layout
Carousel markup usually needs grouped output, so treat every third Ditto item as a boundary for opening and closing the wrapper block.