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
- syntax error: unexpected token <
- Infinite Scrolling in Asp.Net MVC with jQuery / AJAX Issues
- My javascript is returning this error: $.ajax is not a function
- Adding images to a Bootstrap Carousel with AJAX
- jQuery Ajax POST example with PHP
- Refresh/reload the content in Div using jquery/ajax
- How can I get form data with JavaScript/jQuery?
- Download a file by jQuery.Ajax
- jQuery’s .on() method combined with the submit event
- Ajax success function
- How to make a script load after Custom Block is loaded in the editor?
- Creating my own Admin Forms in a WordPress CMS?
- Ajax call does not activate callback function
- jQuery and AJAX Not working with Select Form Element
- Using AJAX to return search form results
- WordPress AJAX Call Not Return Result
- Widget Javascript code (ajax)
- Using transients to store captchas
- Access/update database with jQuery
- How to correctly add JQuery in a WP theme?
- wp_ajax unauthenticated and authenticated
- WordPress ajax function parameter value not being passed
- How do I embed a Javascript form directly into a page?
- How to link external JavaScript files?
- AJAX Contact Form Issue
- Ajax return code 400
- How to test nonce with AJAX – Plugin development
- How can I defer these JS files?
- Form isn’t inserting data into database with ajax plugin
- 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
- Viewing checkout page removes fees from mini cart
- How Can I Move Data From Form 1 To Form 2
- 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 Import / Upload Files with jQuery AJAX?
- Why use admin-ajax.php when loading pages through AJAX?
- wordpress add_action() issue in ajax call
- Ajax Validation for reCaptcha
- WordPress : using AJAX to get posts & Sidebar Content to an external application
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- wp_mail doesn’t work when logged in?
- Call current post URL in ajax
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Custom Form not generating URL
- 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
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Jquery POST Ajax Return null data in wordpress
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- Ajax Call not Working in Plugin
- Opening Modal popup on Ajax form submission
- mailchimp integration on a custom footer
- Ajax sometimes work and sometimes just don’t work
- WordPress live search and filter
- Update $wpdb query with AJAX
- AJAX to add to cart multiple products woocommerce
- Download doccument on server rather than clients browser
- Javascript Tooltip not fully working on my wordpress page
- Javascript output now showing in custom widget
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- Where to put coding a validation script for store? [duplicate]
- Execute function with jQuery if widget added or removed?
- Filterable posts using categories
- How to automatically pull an information from a form field onto an other page?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- how to auto fille conatct form 7 when user is logined
- Multi-site customization
- Automatic add space if user enters number(any digit)
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- Submitting my form to the database and then redirecting to payment site
- $_POST empty in using new php file added to theme
- 500 (Internal Server Error) of external php file
- Ajax, jQuery and WordPress
- Dynamic Gallery
- add unique code required to register
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- notify users when changed database
- WordPress Custom wp mail template return full template
- AJAX call not initializing for non-admins in WordPress