I have this simple form
<form action="" method="post" class="smart-green">
<h1>Contract Form
<span>Please fill all the texts in the fields.</span>
</h1>
<label>
<span>Client:</span>
<input type="text" name="client" placeholder="Your Client Name" />
</label>
<label>
<span>Your Name (Salesman):</span>
<input type="text" name="salesman" placeholder="Name" />
</label>
<label>
<span>Construction Name:</span>
<input type="text" name="construction" placeholder="Construction Name" />
</label>
<label>
<span>City:</span>
<input type="text" name="city" placeholder="City" />
</label>
<label>
<span>Items:</span>
<input type="text" name="id_item" placeholder="Item" />
</label>
<label>
<span> </span>
<input type="button" class="button" value="Send" />
</label>
</form>
It is a form for orders. I need to be able to enter a value of items I am going to enter (5 for example) and then I need the "Items" input to appear 5 times. I also need to be able to remove it, so user can correct himself. I don't know how to code in Javascript, so is this even possible? How? I need to access it later as an array in my controller. Thats why I have the name of the field as an array. Thank you in advance for your help.
EDIT: I have just found something similiar to what I need here: http://www.sanwebe.com/2013/03/addremove-input-fields-dynamically-with-jquery I just dont want it to be a button, but a field with a input for a number and for it to not have a limit. I wish I knew Javascript :<
EDIT2: Maybe I wrote it unclear, but I CAN use Javascript, I just dont know how to properly programm in it, so if anyone knows how to achieve that in Javascript, I would be glad.