I am building a website, where on the click of a link you can clone the form elements, what I am wanting to know is that, when I send the $_POST
to my controller and check that the information submitted is correct, how do I then return a template that has enough elements so that errors can be rectified, so example my original form looks like this,
<fieldset class="entry">
<label for="email_address">Email Address</label>
<input type="text" name="email_address[]" value="" class="text small"/>
<label for="firstname">Firstname</label>
<input type="text" name="firstname[]" value="" class="text small"/>
<label for="surname">Surname</label> <input type="text" name="surname[]" value="" class="text small"/>
</fieldset>
how can I return the correct amound of fieldsets based on the $_POST?