[html-formfu] (no subject)

Carl Franks fireartist at gmail.com
Mon Nov 3 10:12:58 GMT 2008


2008/11/3 Jens Schwarz <blacky6767 at gmx.de>:

> So the "Date" element has those nice "prefix" attributes. In addition with "constraints Required": If a user does not select any date (i.e. "-year-", "-month-" and "-day-" remain selected), he gets the message "This field is required".
>
> My question: Is it somehow possible to add such a "prefix" also to a regular "Select" element so that I get the same behaviour (i.e. "This field is required" if the "prefix" remains selected)? I tried this without success:


Yup - see the docs for empty_first() and empty_first_label()

http://search.cpan.org/~cfranks/HTML-FormFu-0.03005/lib/HTML/FormFu/Element/_Group.pm#empty_first
http://search.cpan.org/~cfranks/HTML-FormFu-0.03005/lib/HTML/FormFu/Element/_Group.pm#empty_first_label

Carl



More information about the HTML-FormFu mailing list