I was trying to append input tags on clicking a button and was successful. I refered to many links
append new rows and input tags using jQuery
Jquery appended input button doesn't function with .on(click)
But now the problem is i'm using these input tags in a form and was trying to send those input tag values to next page using form action. But i'm unable send the appended input element values.
**
jquery
$("#addshowtime").click(function(){
$("<input type='time' value='' />")
.attr("id", "showtime5")
.attr("name", "show_timing5")
.prependTo("#showtime");
});
**
html
<label><strong>Show Timing1</strong></label><input id="showtime1" type="time" name="show_timing1" required/>
<label><strong>Show Timing2</strong></label><input id="showtime2" type="time" name="show_timing2" required/>
<label><strong>Show Timing3</strong></label><input id="showtime3" type="time" name="show_timing3" required/>
<label><strong>Show Timing4</strong></label><input id="showtime4" type="time" name="show_timing4" required/>
<cfinput type="button" id="addshowtime" class="btn" onClick="addInput()" name="add" value="+" />
<cfinput type="button" class="btn1" onClick="subInput()" name="sub" value="RESET" />
<p id="showtime">
</p>