Hello

In Cocoon 2.1, Forms, how do I require the user to fill at least one out of two (or more) fields?

For example, I might have the 'phone' and 'mobile' fields. I want the user to fill at least one of them, possibly both, and I don't want the form to validate if they're both empty.

I've tried to add the validator to one or the other, but it seems the wrong place to put it (Cocoon forms have a strict hierarchical structure) and in fact the behaviour with ajax and browser-update is buggy. I've tried to add the validator to the form widget itself, but then the error message is not picked up by the jx template, and the user is stuck without knowing what is wrong.

Where should I put such a validator?


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to