I have been trying for some time to get this to submit.
Not sure how to place listners to make this submit. I need all of it in the same file since this is for a company developing all code internal, there is no option of including another js.js page. Also this company does not utilise PHP at all!!!
Not sure what i am doing wrong.
Would really appreciate so much if someone could help out.
Excuse my ignorance!!
var form = new FormData();
form.append("email", "anim enim cupidata");
form.append("first_name", "ipsum pariatur adipisicing");
form.append("last_name", "officia ");
form.append("address", "elit");
form.append("city", "dolor Excepteur");
form.append("country", "ipsum");
form.append("zip", "in laboris dolor");
form.append("state", "est consequat ea pariatur");
form.append("phone", "qui dolore");
form.append("industry", "do non amet et");
form.append("org", "enim");
form.append("job_title", "dolore in");
form.append("purchasing_time_frame", "nulla irure anim sunt aliquip");
form.append("role_in_purchase_process", "elit ipsum enim");
form.append("no_of_employees", "officia incididunt nostrud occaecat");
form.append("comments", "mollit nulla nostrud Excepteur");
form.append("custom_questions", "[{\"title\":\"amet eu qui do\",\"value\":\"ipsum Duis veniam\"},{\"title\":\"cupidatat et velit nulla\",\"value\":\"eiusmod non dolore qui\"}]");
var settings = {
"url": "https://api.zoom.us/v2/webinars/WEBID/registrants",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "multipart/form-data"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
});
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form>
<input name="email" placeholder="email"/>
<input name="first_name" placeholder="Name"/>
<button name="submit" type="submit">Submit</button>
</form>