Hi, I'm having trouble trying to add/update to a database from some checkboxes. I have 6 checkboxes that are bound to 6 columns in my database. Any combination of the 6 can be checked. I've set the column types to TINYINT(1). I've got a Data Detail bound to a form to show the checkboxes as checked if the value is 1 and unchecked for any other value. I can't however update (or insert) a value. Text boxes and text areas in the form work fine.
This is the HTML code for one of the update checkboxes:
Hey Duncan, You just need to use the Checkbox group component (available in app connect).
Insert it in the detail region, and bind your dynamic value, returned from the database to it: prntscr.com/kqrark Then inside the checkbox group component insert a checkbox and your static value to it - i believe it should be value="1" if you are using boolean field: prntscr.com/kqrauq
The checkbox group component will automatically check the checkbox if it receives a value of "1" from your database.
Thanks Teodor, It's partially working. The checkbox shows as checked if the value from the database is 1. I can uncheck it and submit the update and that changes the value in the database to 0, but then no other updates work. I check the box, submit and the value stays as 0. I can't get the value back to 1.
Hey Teodor I have made the move to wappler, but have to use dreamweaver for this site. I tried the suggestion above to use the static value to put a 1 in the database if checkbox is checked, but it will not write a one to the database. Please tell me what is going wrong here. www.ahiabenefits.com/careers/AEcareer.php Select anything from the list on the right to edit and the checkbox is at the bottom of the page.
Teodor I'm sorry I'm saying this wrong - I just want to have the checkbox insert a "1" into the DB if the end user checks it. It is not the same problem Duncan had above. If you check the box which is set to a static value of "1" it will not write a "1" to the DB. Form works fine except for that. Please let me know - thanks.