I am curious to know if there is a way to dynamically add an arbitrary number of CForms as SubForms.
I’m not going to try and describe this entirely in abstract terms so I will simple provide an example.
Customers can have an arbitrary number of addresses linked to their account, so if they wanted to add two when they register I don’t see why I should prevent that. I show them a form where they can put in their First and Last name and Jquery tabs beneath that with one tab being an Addresses tab. On that tab there is a button they click to add an address and when that happens it adds an Address Form as many times as they click it.
So with that being the example,
How could I display multiple forms by clicking the add button and be able to process that in the controller with something like
I did find a way to do it, but I had to extend the framework almost to the point of my code becoming a ‘hack’. So I eventually ended up back at using the code from the blog post example for adding comments. I have not fully implemented this yet but once I do I will share it. This is a website I am working on part time so it will take a week or two to get back with anything complete.