On 28/08/07, Barry Hoggard <[EMAIL PROTECTED]> wrote:
> I'm porting something that used FormBuilder before, and had
> highlighted labels for items that are required.  What's the best
> practice using FormFu for doing that?

auto_constraint_class()

It can be set on a per-form or per-field basis.

For example, this field would get the following markup:

---
elements:
  - name: foo
    auto_constraint_class: '%t_constraint'
    constraints:
      - Required
      - Integer

    <span class="text required_constraint integer_constraint">
    <input name="foo" type="text" />
    </span>

See the docs for further details:
http://search.cpan.org/~cfranks/HTML-FormFu-0.01003/lib/HTML/FormFu.pm#auto_constraint_class

Cheers,
Carl

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to