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

Owner: Nobody in particular
Requestors: tshinnic [...]

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

Subject: Using 'invalid' as invalid field flag from templates documented wrongly
Download (untitled) / with headers
text/plain 705b
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 %]

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to