On Tuesday 25 September 2007 13:28:00 Cosmin Budrica wrote:
> I can't trigger then constraint when it's supposed to, it always stays
> on the Required constraint.
>
> Here's the code:
> ---
> elements:
>  - type: Select
>    name: school_fk
>    label: University
>  - type: Text
>    name: school
>    constraints:
>      - type: Required
>        when:
>          - field: school_fk
>          - value: x
>
> the school_fk select is populated with a structure like:
> [ ['x', 'Other schools'], [1, 'University 1'], [...] ]
>
> What am I doing wrong?

It should be:
    constraints:
      - type: Required
        when:
            field: school_fk
            value: x

No minus in front of field and value.

Greets,
Mario

_______________________________________________
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