Dynamic input field generation
I have a complicated (well to me it is!) problem with a form I am creating for my site. The form has three sections with the ability to add another field unlimited times. There is one for adding ingredients, one for equipment and one for steps
There is also another problem in that if I create say 3 steps bringing the count up to step4 and then remove the second step, I cant see how I can bring the other steps after step2 count down by one, at the moment step4 and step3 are staying as step3 and step4 but because step2 was removed they should drop down to becoming step2 and step3. My php that inserts the data into my db isnt working because the ids keep getting messed up
I have a demo URL up on ajburchell.com/form.html
If anyone can help me with this I will be extremely grateful
Thank you in advance
First of all: Never ever use more than one instance of jQuery on the same page. You are using versions 1.3.2 and 1.6.4 together, which will create problems.
Second: You use the global "var current" several times. Each one overwrites the previous one in that case.
Despite this, when I add two new Ingredient areas and fill out number 3 for example, I can see from the POST request that it was correctly sent as ingredient3. So I don't see the problem
|All times are GMT +1. The time now is 12:59 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.