I’ve searched the internet about generation of ‘dynamic’ forms, It seems to me many want this but theres no or hard to find info about it.
I really need this for my new project and want to do it the propper way. let me first explain the situation:
Currently i have an GII generated _form consists of 3 input fields and an hidden _crfs hidden auth key, its linked with a simple and 1 modelA.
ModelA has an foreignkey constraint to many modelB’s (modelA is connected to many modelB’s).
Now when i get to my problem,
When i come to the create page of modelA i fill in the 3 input fields… BUT i also want to be able to create ‘dynamicly’ many (not known quantity(add one on button.click for instance)) of modelB’s.
For instance is it secure to just add fields and add them to the $_POST? and how should i validate the results? I dont want to make for all modelB form elements (in the modelA create page) to have an submit button, i also would like to do some auto saving (ajax?), Is this possible? are there any propper ways to do this? where can i find the documentation?
Thanks in advance!