Thanks for taking the time to respond David (and do up the example code),
That's closer to what I was wanting to do and would definitely work if I was just replacing existing checkboxes without adding or removing any new ones dynamically.
However, I now realize (and understand what Carl was getting at) that I'm still going to have to work directly with the database because the result I have could result in a changing number of checkboxes and main fields generated. I can still build the form with the basic static fields that won't change but I'm using the methods from the RGFormsModel class to interact with the database when generating my form to insert the new fields as part of the $form object for my created form. I'll also have to populate changes across the other tables where $field data is linked in relationship (i.e. lead* tables) so I can maintain the entries records when the form changes.
Thanks for your help guys and for such a straight forward database structure and VERY clean code base! You've made it easier to understand how things are working and for me to come up with a workable solution!
Posted 13 years ago on Friday December 17, 2010 |
Permalink