Armaz Mellati wrote:
Hi



What is the best way of validating based on the values of several widgets in a 
CForm ? I mean somthing like this:

If (model.foo == 'something') && (model.bar == null) {
        return false;
}else{
        return true ;
}


Where should I do or can I do such a validation ?
Any idea ??

Have a look at the form definition of "form1" of the samples. There you'll find a custom Javascript validator assigned to the form (http://svn.apache.org/repos/asf/cocoon/blocks/forms/trunk/samples/forms/form1.xml)

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to