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
- Cross-Origin Read Blocking (CORB)
- Send POST data using XMLHttpRequest
- How to generate a simple popup using jQuery
- jQuery Ajax File Upload
- AJAX response error: net::ERR_EMPTY_RESPONSE
- How to reset a form using jQuery with .reset() method
- Access Control Request Headers, is added to header in AJAX request with jQuery
- How to reset a form using jQuery with .reset() method
- How to manage a redirect request after a jQuery Ajax call
- Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined
- WordPress AJAX File Upload – FrontEnd
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- WordPress Ajax always returns a 404 error
- Getting $comments outside the comment template
- POST from jQuery to PHP
- How to Use JSON With AJAX?
- Using wp_ajax and wp_ajax_nopriv hooks
- Click loads template via ajax
- Accept AJAX call with serialized form data
- Sending jsPDF documents to the server
- jQuery Ajax passing empty parameters to my function?
- How to implement a custom password field that redirects to another page upon correct password?
- Loading posts via AJAX in a hidden div with updated URL?
- add JS to multiple plugin admin pages
- 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
- splitting the URL using jQuery
- Adding custom field in all widgets, but at the top of the form, in admin area
- Scripts not appending to element in AJAX call – why?
- Save Search System
- dynamic dependent select dropdown
- Refresh Markercluster after ajax call
- 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
- How do I Import / Upload Files with jQuery 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
- Loading two different AJAX requests on two different pages
- wp_mail doesn’t work when logged in?
- Call current post URL in ajax
- Custom AJAX form not working async
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Call javascript functions from each page
- Using AJAX to run SQL statement and populate dropdown
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Ajax page load in wordpress the right way?
- 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
- How to create multipage form and redirect to specific URL based on inpput?
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- Opening Modal popup on Ajax form submission
- mailchimp integration on a custom footer
- Bootstrap slider not working
- Ajax sometimes work and sometimes just don’t work
- JS working when used normally but not in wordpress
- Can’t Listen to KeyDown in TInyMCE Iframe (jQuery) and Pass it to Parent HTML FORM
- Update $wpdb query with AJAX
- Download doccument on server rather than clients browser
- Javascript Tooltip not fully working on my wordpress page
- Javascript output now showing in custom widget
- Perform javascript when an input in Customizer is selected/focused?
- How to echo a PHP code into WooCommerce variation product?
- Ajax show custom post data form & script
- Execute function with jQuery if widget added or removed?
- How to automatically pull an information from a form field onto an other page?
- 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?
- Custom user fields validation on registration
- Ajax, jQuery and WordPress
- add unique code required to register
- Page reload occurs before request finishes
- Adding Custom HTML/CSS/JS code in specific page
- notify users when changed database
- Particle.js not loading in WordPress Gutenberg
- WordPress Custom wp mail template return full template
- Multi color post title by using custom javascript inside the gutenberg editor?