Skip Menu |

This queue is for tickets about the CGI-FormBuilder CPAN distribution.

Report information
The Basics
Id: 3897
Status: resolved
Priority: 0/
Queue: CGI-FormBuilder

People
Owner: Nobody in particular
Requestors: tshinnic [...] io.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.11
Fixed in: (no value)



Subject: Using 'invalid' as invalid field flag from templates documented wrongly
Documentation on site and in distribution mentions using template constructs like "[% IF field.invalid %]" or "[% myfield.invalid %] # invalid flag" as ways to test whether a particular field failed validation. There is no such value. There _is_ a "form.invalid" flag for the form as a whole, not mentioned in the docs. But this is not useful for knowing when to display an error message for a particular field. Looking in the module code I find setup for "field.error" to contain an error message when a field fails to validate, and it appears that this is the proper value to test. In fact, this code works: [% IF field.error %] <font color="red">[% field.error %]</font><br> [% END %]