Checkboxes not working
I have run the Update Single Page wizard so many times, but just can't get the checkboxes to work. No matter what I do even if I don't touch them, they always enter a value of 1 into the DB. If I use the Data Assist wizard to create a new range of pages, then checkboxes work fine, but this isn't enabling me to work with the session that security assist creates to identify what user account I am affecting!
I have opened time and again the update record behaviour to bind each checkbox to its relevant DB field, I have set the dynamic value to the relevant DB field, I have set the type to Checkbox 0,1... I am at a loss.
This example code is from the Data Assist wizard which created a new update page which is working:
<input type="checkbox" name="UserVENUE" id="UserVENUE" value="1" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("userupdate","UserVENUE"):"".$row_SecurityAssisttblusers["UserVENUE"].""),"1"))) {echo "checked=\"checked\"";} ?>>
And this is from the Update Single Page wizard where I already have a form already in place:
<input name="UserVENUE" type="checkbox" id="UserVENUE" value="1" <?php if (!(strcmp($row_SecurityAssisttblusers['UserVENUE'],1))) {echo "checked=\"checked\"";} ?>>
There's a big difference in the code produced, but why? When I look at the dynamic values window from the property panel it has different code, so where can I learn what I need to enter there?
Even when I take the code of the Data Assist Update page and add and amend it to my page it still doesn't work! The only way it seems that I can get a checkbox to work is if I use the Data Assist created pages and pass the record ID to be updated through the URL rather than with the session ID!
Could you take a look at the attached file and let me know why the Update Single record wizard hasn't done what I expect and tell me where you think I have gone wrong?
Thanks