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:

<validator class="or" required="true">

  <validator class="number" required="false">
   <argument>user_disabled</argument>
  </validator>

  <validator class="set" required="false">
   <ae:parameter name="export">user_disabled</ae:parameter>
   <ae:parameter name="value">0</ae:parameter>
  </validator>

</validator>

Regards,
  Marius.


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

Reply via email to