get data from form and make ajax call to our api code example
Example: jquery ajax endpoint
$.ajax({
type:"GET/POST",
url: "target url",
data: "var1=" + data1,
success: function(msg){
$("#targethtml").html(msg)
},
error: function(errormsg){
console.log(errormsg)
}
});