Hi, I'm trying to use form encode to validate a form checkbox, in the
template:
<td>Flagged:</td><td> ${ h.check_box('flagged', value=True,
checked = c.flagged) }</td>
In my validator:
flagged = formencode.validators.StringBoolean()
But the problem I'm having, is if the checkbox isn't checked, it
doesn't get returned in the form post so the validator throws up it's
hands saying this value is missing
<td>Flagged:</td><td> <!-- for: flagged -->
<span class="error-message">Missing value</span><br />
<input id="flagged" name="flagged" type="checkbox" value="True"
class="error" /></td>
I'm using the @validator decorator in my controller... Ideas on how
to fix this?
thx
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---