Hi Chris I think this is browser behaviour: if the checkbox is unticked it won't send anything at all.
And according to the Mason book if you declare an argument in an %args block without a default value then that means it is required. So, if the user does not check the box the checkbox key/value is not sent at all and you get your error. Maybe if you define a default for it: <%args> $m => 'x' </%args> Then you can tell: if 'v' it was checked. If 'x' not checked (and no error) regards Justin E. enquir...@mms-oxford.com ----- Original Message ----- From: "ch" <ch_m...@gmx.at> To: <mason-users@lists.sourceforge.net> Sent: Tuesday, December 22, 2009 6:01 PM Subject: [Mason] checkbox in mason > hi! > > I have problems with mason and a form with one single checkbox. Perhaps > I do not have the richt point of view. > > <form action="a.mas"> > <input type="checkbox" name="m" value="v"/> > </form> > > In the a.mas I have: > > <%args> > $m > </%args> > > $m is initialized if the checkbox is checked but undefined (and I got an > error) if not. > If I do not use %args but take %ARGS I find nothing if unchecked an key > name = val if checked. So it is consistent with the manner of $args. > > Is there a way I can simple use the %args > or do I need to check %ARGS with undefined etc.? > > thanks! > chris > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users