First, when the edit URL is invalid, it throws an exception.
Why not make an error message available in the template? That way if someone types in a wonky URL, we have control over what they see.
Second, everything in the value
array is returned as a string, even if it should be boolean.
I think this is what's keeping me from being able to use checkboxes properly. I have a checkbox I'm using to let users mark their submitted content as ready for review. Then, an editor will uncheck it after providing feedback on the front end.
In my template I have:
<input type="checkbox" name="review" id="review" {{ if value:review }}checked{{ /if }}>
Before the user ever checks, it's great. After they check, it's great. However, when someone unchecks it and submits the form, it's still saved as true
in the file and returns "1"
in {{ value }}
.
Finally, the content
field returns "true"
in {{ value }}
instead of its contents.
I'm using Statamic 1.10.5 and Raven 2.1.1.