unchecked checkbox handling in scripts
Posted: Sun Sep 22, 2013 6:15 pm
hi all,
can anyone give me a hint how to deal with unchecked checkboxes in a script?
I've multiple checkboxes defined in a form such as the one below
in the script I'm accessing these using the $requestParameters-method:
if any of the checkboxes is not checked the script runs into an error state because requestParameters returns with an error
I also tried to use the code below without success
any help is greatly appreciated!
Thanks
can anyone give me a hint how to deal with unchecked checkboxes in a script?
I've multiple checkboxes defined in a form such as the one below
Code: Select all
<div class="chkbox">
<input type="checkbox" id="addinfo" name="ADDINFO" value="1" >
</div>
Code: Select all
#set( $addinfo = $requestParameters.ADDINFO )
Code: Select all
Error in line 5, column 29: Null reference $requestParameters.ADDINFO.[]
Code: Select all
#set( $addinfo = $!requestParameters.ADDINFO )
any help is greatly appreciated!
Thanks