> 
> On Feb 17, 2009, at 11:17 PM, Marius Hein wrote:
> 
> > Hi Hi.
> >> you can either work around that behavior in your html-code by  
> >> adding a
> >> hidden input field with a value of "0" before the checkbox. Or you  
> >> can
> >> use an AgaviSetValidator - it only exports a given value, thus  
> >> allowing
> >> you to set an incoming parameter. Use an OrOperatorValidator to  
> >> combine
> >> the validator for your field (so that it's run when the box is  
> >> ticked)
> >> and the AgaviSetValidator (so that the value is exported if the box  
> >> is
> >> not ticked).
> >
> > Thanks for that hint, I think the AgaviSetValidator is the best  
> > solution:
> 
> I do agree. Changing the HTML Source to handle issues with the  
> application logic always seems like a hack.
> 
> >
> > Regards,
> > Marius.
> 
> 
> cheers
> 
> felix
> 

Would the following be another "usable" solution?

<validator class="equals" required="false">
  <argument>user_disabled</argument>
  <ae:parameter name="value">1</ae:parameter>
</validator>

$user_disabled = $rd->getParameter('user_disabled', 0); // default value if not 
present


Regards,

Steffen

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to