Lol, I never came back here to see all your replies.
But to answer your (open) questions :
CtrlZ : The hidden form field is used to determine the amount of fields the user has 'selected' / 'added' to the form. The value is auto incremented when pressing the (+).
Eeyern : It goes a bit far to explain to lot, but the form values can be parsed in the 'action' script.
Henri Kuiper (0) - 4 years ago - Reply 0
First of all, I really like this! After playing around a little bit, I still don't understand, what is the first <input> with type="hidden" for? Also, I can not track down the "#count"-selector, which is used in the addFormField()-function to set the value of "next". What do I miss? Maybe somebody can point me in the right direction.... Thanks a ton!
CtrlZ (0) - 4 years ago - Reply 0
How does this work with php? Adding stuff to the database? I know you would probably know how to do html, but any idea how to add form details into mysql database?
Eeyern (0) - 4 years ago - Reply 0
I have an idea =)
Use Backbone JS and Laravel PHP framework to do that ! Please read more at
Or just use AJAX from jQuery and send over JSON response from the form into the PHP script where you can process it and put it into the database. Laravel will make those things easier for you though, please look on my blog to get started with it.
maxsurguy (0) - 4 years ago - Reply 0
how to do this with input of type="file"? :)
Bosanac (0) - 4 years ago - Reply 0
Hi, Sorry for asking a stupid question, but do we need to simply copy paste the script in an html editor? I am asking this because I tried this in a website, and nothing happened, I meant the button was not created. Help will be appreciated
Kaamil Nakhasi (0) - 5 years ago - Reply 0
maxsurguy (0) - 5 years ago - Reply 0
You need to load jQuery as well before the <script> section in this snippet.
XoneFobic (0) - 5 years ago - Reply 0
Woot, first post ;)
Henri Kuiper (0) - 5 years ago - Reply 0