JQuery AdDelFields

JQuery AdDelFields

4.80 (5 ratings) 4.80 stars
Cart 53 sales

This plug-in is very useful for those who need to duplicate or delete fields within a form.

1) You insert the form inside a div (container) that has a specific class eg. (Class = “contenitore_input”)
2) il div con classe “contenitore_input” verrà chiuso in un ulteriore div con un id specifico es:.(id=”contenitore_generale”)
3) the div with class “contenitore_input” will be closed in another div with a specific id eg. (id = “contenitore_generale”)
4) assign a reference attribute to each field to be duplicated eg. &lt input alt=”nome” &gt
this attribute will be the fixed part of the “NAME” and “ID”, in this case:
considering the field &lt input alt=”nome” &gt
will become
&lt input alt=”nome” name=”nome_ 1 ” id=”nome_ 1 ” &gt
click on add …
&lt input alt=”nome” name=”nome_ 2 ” id=”nome_ 2 ” &gt
This allows the page receiving the request to obtain the value of a specific input or simply differentiate between them
also allows differentiation of the id to act on the elements via JS uniquely

1) implementation of a sort of validation to the addition of fields:
  • class to indicate the binding of a field
  • class to indicate that a field must be numeric
  • class to indicate that a field must contain an e-mail
  • class to indicate that a field must contain a date in the format dd / mm / yyyy

2) callback functions are available after the addition and after removal of fields
3) duplication of all the attributes of duplicate fields for consistency