well last few days i been trying to figure this out an i cant seem to.
ok on the first page i have a form that someone fills out an theres a checkbox. if it is checked it is true, if it is not it is false. Then you submit the information an it goes all into the database.
You are then taken to a second page where you see the exact same form from the first page again, except you see what you had typed in on the first page on the second page. On the second page you basically just see what you typed in before an if you notice a spelling error or if you selected something you shouldn't of you fix it an then click the update button an it updates the database.
The problem i am having is with my check box. When i fill it out the first page an submit it, it works correctly. However, when i try to make updates to it on the second page is when i run into problems. What happens is, is if i enter a value that is true on the first page an then try to change it on the second page to false it wont. It will remain true. If i submit it as false an then change it to true it will go true, but if i try to change it back to false it will remain true. Here is my code
the checkbox on the first page
<input type="checkbox" name="htpp" value="1"/>
the check box on the second page
<cfparam name="Form.htpp" default="0"> <input type="checkbox" name="htpp" value="1" id="htpp <cfif #form.htpp# eq "1">checked=yes</cfif>
i have tried to take the value="1" out of the second page, but if i do that then it screws up the update saying that there is no value for that field an wont submit.I have tried changing the value to 0 an when i do that if i enter a value of true an change it to false it will do it, but if i try to change it to true from false it will remain false.
Thanks you to all who help,