cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobia Conforto <tobia.confo...@gmail.com>
Subject Re: Cocoon Forms 2.1 - One of two fields required
Date Wed, 25 Feb 2009 10:46:34 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message