Klapsius Klapsius - 1 month ago 6x
PHP Question

How to submit HTML multiple forms generated by jQuery

On ajax success i have list of generated forms:

success: function (data) {
$el.append('<form method="POST" class="submit_form">Name: '+data[i].namen+'
Id: '+data[i].id+'<br> SomethignElse: <label id="red">'+data[i].se+'</label><br> SomethingElse2: '+data[i].se2+'
<input type="text" name="id" value="'+data[i].id+'" id="id_test" />
<input type="button" class="submit_button1" value="Add"/></form><br>');
i = ++ i;

Also i have a click functionto submit this forms/form:

//do something

but nothing happens on click. Is it possible to submit in this way?


Please try .on('click' event listner.

    //do something