help with a clone element of jquery


I have a problem with a jquery clone element: I clone the next element.


    if ($("#id_alergia_paciente").val().length <= 1) {
        return false
    } else {
      $( "#id_alergia_paciente").clone().appendTo( "#contenedor_alergia");


So all right because clono and pass the value of the input that clono my question is: how do I collect the data every input cloned and enter them in the database table is allergies and only has id field, patient id and field allergies that is where you would save each clone. They like it very much if they help me with this since I've been here for days and I do not know how to do it

HTML CODE this is the cloned input:

   placeholder="Ingrese una alergia"
   class="validate alergia">

this would be the container where it is cloned:

asked by solis j 19.12.2018 в 21:36

0 answers