Forums

Save each checkbox item to a separate record in the DB table

vividal 31 Jan, 2018
This is my first time using a checkbox field. I checked the manual and forum but I couldnt find anything that showed how to do what I need.
I have a form with a checkbox field and 4 other dropdown fields. When the submit button is clicked I would like it to save to the database table with each checked item getting its own row in the DB with the ID of the item in the checkbox and the values of the 4 dropdowns. When I tried it, I got only one entry and checkbox field had all the ids of the checked items.
Thoughts on how to get each item to write to its own row?
GreyHead 31 Jan, 2018
HI vividal,
You will need to use some PHP in a Custom Code action in the form On Submit event to structure your data in an array with four sub-arrays of data. Then you can use a Save Data action to save all of the entries.
Bob
vividal 31 Jan, 2018
ok so here is where my abilities end. I am not a programmer. I got a programming degree in college 25+ years ago (when that was all there was) and have never really used it as I went into Networking & Systems. Now I have started this "for fun" project but I seem to be at a cross roads. Is there a site where I could pay someone to write the snippets of PHP code I need to supplement what Chronoforms/Chronoconnectivity wont do? I apologize in advance if this type of questions has been asked before or is not allowed in the forum, just trying to figure out how to keep my pet project going.
thanx,
GreyHead 01 Feb, 2018
Hi vividal,
If you add a Debugger action and post the output here together with a spec for exactly what you need to do then we may be able to help you.
Bob
This topic is locked and no more replies can be posted.