Hi Armaz! Check the cforms "various actions" sample on cocoon\samples\blocks\forms.
You can use javascript to achieve the efect, something like this: <fd:on-value-changed> <javascript> var current_widget_value = event.source.value; var myFirstWidget = event.source.parent.lookupWidget("myFirstWidget"); var mySecondWidget = event.source.parent.lookupWidget("mySecondWidget"); if (mySecondWidget.value == myFirstWidget.value) { do_something_here(); } </javascript> </fd:on-value-changed> Greets, CarlosN. On Wed, 29 Jun 2005, 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 ?? Regards, Armaz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]