Your jQuery event is bound to elements with the class submit, but your submit button in the form doesn’t have that class.
Either add that class to the submit button, or just target the form itself. Simply change
$(".button").click(function() {
to
$("#modalForm").submit(function() {
This will fire when the form is submitted, whether the user clicks the submit button or simply hits enter in a text field.
Related Posts:
- jQuery AJAX submit form
- FormData append not working
- How to use get_option() without any filter?
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- window resizing problem
- Load MediaPlayerElement after Infinity Scroll loads more posts
- How to add a do_action on refreshing of WP customizer?
- How to display contact form 7 form in vanilla js without jquery in frontend
- WordPress Customizer: Check for value of CSS selector and replace it
- WordPress Ajaxifying not working properly
- Prevent posts from being published if the ‘Uncategorized’-category or no category is selected
- How to make Contact Form 7 work when injected via AJAX in WordPress?
- class click counter save number
- How can I defer these JS files?
- Ajax Modal Flickers When Opened Multiple Times
- Create simple Cookie Box for WordPress
- Ajax not working properly
- AJAX request status 200 but no actual “response”
- how to add custom css and js on wordpress post editor directly without using .php file
- Correct way to write jQuery functions in WordPress
- Form isn’t inserting data into database with ajax plugin
- Load more posts with multiple queries
- Using Fullscreenr with a wordpress blog – weird bug
- Javascript Solution Remove Specific Tag but leave the rest in a specific DIV
- splitting the URL using jQuery
- Understrap child theme JS not working in custom-javascript.js file
- Adding custom field in all widgets, but at the top of the form, in admin area
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Scripts not appending to element in AJAX call – why?
- Viewing checkout page removes fees from mini cart
- Save Search System
- dynamic dependent select dropdown
- Refresh Markercluster after ajax call
- Include custom JS without child theme
- Custom search to display results within same page
- WooCommerce Ajax Cart Update Stopped Working
- How can I display a PHP foreach loop’s answers by AJAX
- How Can I Move Data From Form 1 To Form 2
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- How to search using ajax for exact phrase or words in an input field?
- Menu jumping when calling it via PHP
- Setting value of session with Ajax not working
- Frontend Post with JQuery AJAX to Php Issue
- How do I pass the id of my widget to javascript in the form function?
- AJAX not Working with php as supposed
- Trouble with WordPress Ajax Login System – 302
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- videopress videos are not displayed when loading the content with ajax in a lightbox
- How do I Import / Upload Files with jQuery AJAX?
- WordPress admin-ajax.php 400 bad request
- WordPress Ajax Call inserting data but success response false
- Custom Login Process
- How to return multiple arguments from AJAX callback function
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Ajax contact form return 0
- url – ajax loaded but no JS
- Ajax form submit not working, returns 0
- Why use admin-ajax.php when loading pages through AJAX?
- wordpress add_action() issue in ajax call
- Using admin-ajax prevents regular php form submission
- Ajax Validation for reCaptcha
- Properly embed javascript into WP (using function.php) – doesn’t work?
- WordPress : using AJAX to get posts & Sidebar Content to an external application
- Uncaught ReferenceError: jQuery is not defined – although jQuery is loaded [closed]
- Saving contact form 7 data into custom Table
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Loading two different AJAX requests on two different pages
- wp_mail doesn’t work when logged in?
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- Output multi-steps form results in same page
- Woocommerce custom checkout form
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Call current post URL in ajax
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- Upload a web module (html and JS) to wordpress
- Custom login and registration forms
- Custom AJAX form not working async
- Can’t add classes using jQuery from a JSON string with get_body_class()
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Accessing an API with jQuery and AJAX
- How to add WordPress JS Script Links
- Showing Meta Box via Jquery Checkbox
- Custom Form not generating URL
- Is there some jQuery conflict here?
- custom css and javascript not working on page defined as template?
- Call javascript functions from each page
- Using jQuery .after inside loop
- Using AJAX to run SQL statement and populate dropdown
- Converting a working AJAX form to work with WordPress
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Ajax page load in wordpress the right way?
- Problem with custom function from jQuery slider tutorial
- jQuery forms & updating info
- wp_enqueue_script JS code runs too late (after user begins interacting)
- How do I make Dynamic Student Admission Form?
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form