Merico Raffaele wrote:
Tobia Conforto wrote:
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. Where should I put such a validator?

I use the following construct to do that: After all relevant form fields I add a form field (in my case id="form-validation") that is not displayed in the form but invokes a javascript validation function.

Thank you. Using a separate widget just to validate the collective requirements of other widgets does in fact work.

I'm wondering if it is the only solution. It doesn't seem very clean.

-Tobia

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

Reply via email to