I have a form formatted like so:
http://jsfiddle.net/E3DfA/
What I am trying to achive is so that when the value of the select changes, the number of form inputs changes.
I have searched around, but found nothing that really makes sense to me, I understand I will need to use ajax, but how would I go about this. A push in the right direction would be much appreciated!
You don’t need to use AJAX. You need to capture the
inputevent on your theselectelement and then generate the HTML code you want to display.Have a look at the jQuery library, the documentation contains may examples.
Edit
You were nearly there
You used
.eachwhere you needed to use afor-loop.eachiterates over arrays.