//variables
var html=' <br><form><div class="col-md-6"><div class="row"><div class="col-sm-3"> <label for="ddlprod1"> Product1 :</label> <select class="form-control" id="ddlprod1" name="prod1"><option value="">Select</option> <?php $sql="select * from productdetails where compid=".$_SESSION['compid']."";
$dataArray=$conn->query($sql);foreach($dataArray as $var){?><option value="<?php echo $var['prodid']; ?>"><?php echo $var['prodname']; ?></option> <?php } ?></select></div><div class="col-sm-3"><label for="hsn1"> HSN Code:</label> <select class="form-control" name="hsn1" id="hsn1"><option value="">Select</option></select> </div><div class="col-sm-3"> <label for="prodquantity1"> Quantity :</label> <input type="text" class="form-control" placeholder="Enter Product Quantity" name="prodquantity1" id="prodquantity1" /></div> <div class="col-sm-3"> <label for="childprice"> Rs per Qty :</label> <input type="text" class="form-control" placeholder="Price per Quantity" name="price1" id="price1" /></div> </div> </div> <div class="col-md-6"><div class="row"><div class="col-sm-3"> <label for="total"> Total Amount :</label> <input type="text" class="form-control" placeholder="Price per Quantity" name="total1" id="total1" /></div> <div class="col-sm-3"> <label for="gst1"> GST in %:</label> <select class="form-control" name="gst1" id="gst1"><option value="">Select</option> </select></div><div class="col-sm-3"><label for="childgamount"> GST Amount:</label> <input type="text" class="form-control" placeholder="Price per Quantity" name="gamount1" id="gamount1" /></div><div class="col-sm-3"> <label for="childgtotal"> Total Amount :</label> <input type="text" class="form-control" placeholder="Total Figure" name="gtotal1" id="gtotal1" /> </div></div> </div> </form> ';
// add rows
$("#add").click(function(e){
$("#dynamic_field").append(html);
});
// remove rows from form
});
</script>
What is it?
Обсуждают сегодня