Simple Form using JQuery Plugin
-
Hi Guys
I just need some help embedding a simple html form on one of my wordpress pages.
So my form needs to submit to a certain url and then redirect to a Thank You page.
Normally in a html page i’d use the following:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Test Form - Overture</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> <script src="https://malsup.github.io/jquery.form.js"></script> <script> $("form").ajaxForm({ "clearForm": false, "resetForm": true, "beforeSubmit": function() { }, "success": function(json) { if (json.success == true) { // Form has submitted successfully. alert("Thank you for getting in touch."); } else { for (name in json.errors) { $("form").find("[name$='" + json.errors[name] + "']").css("border-color", "red"); }; }; }, "error": function() {} }); </script> </head> <body> <form method="post" action="https://overturehq.com/formapi/webform/submit.json"> <label>Name:</label> <input type="text" name="personName"> <label>Email Address:</label> <input type="text" name="personEmailWork"> <label>Phone Number:</label> <input type="text" name="personPhoneWork"> <label>Event Date:</label> <input type="datetime-local" name="booking1Date"> <label>What would you like to discuss with us?</label> <textarea name="personNote"></textarea> <input onclick="window.location.href = 'https://www.activetalentagency.com/booking-request-confirmation/';" type="submit" value="Send Enquiry"> <input type="hidden" name="key" value="MTI4NzQxNTE1NzI="> </form> </body> </html>
However I cant get the JQuery script to run in WordPress. I think I may need to add it to my themes functions.php or similar. If anyone could help that would be great.
The page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Simple Form using JQuery Plugin’ is closed to new replies.