You don’t set an action in your form, so nothing is executed.
Add a hidden field with action
to the form:
<input type="hidden" value="submit_filter" name="action">
Also note that this:
$postid = get_the_ID();
won’t work. This is a new request, so there is no post to get the ID from. You have to pass this with your form data as well.
Related Posts:
- jQuery’s .on() method combined with the submit event
- Nonces and Cache
- How to HTML5 FormData Ajax
- admin-ajax.php doesn’t work when using POST data and Axios
- Contact Form 7 Custom Post Action
- Custom Form with Ajax
- ajax – why multiple calls to wp_create_nonce() return same value?
- How to link WordPress heartbeat to ajax form
- Ajax form submission from admin panel
- Confused on AJAX submit form through page template
- how to use reCaptcha v3 in wordpress custom login form?
- Prevent page reload after ajax form submission
- Admin Ajax and HTML5 Formdata
- jQuery Ajax passing empty parameters to my function?
- Using ajax with wordpress
- Using AJAX with Forms
- Ajax image upload with media_handle_upload and form.js
- Ajax post returning full html page as response
- Sending variable from ajax on form submit
- contact form ajax empty response error message
- Can’t trigger an AJAX function with a submit button in the dashboard
- Dynamically add more fields/remove last field in a form
- Ajaxify Form That Submits To Same Page To Display Post Data [closed]
- Using admin-ajax prevents regular php form submission
- Specify ABSPATH in jQuery url
- ajax form is returning the dreaded “[HTTP/1.1 400 Bad Request” and a zero
- Output multi-steps form results in same page
- Using get_theme_mod in php ajax form doesn’t work
- How to create a form button that executes a function?
- How to stop being directed to admin.php after sending request to admin-ajax.php
- How to display contact form 7 form in vanilla js without jquery in frontend
- Should wordpress nonce be placed in html form or in javascript file
- Add Server Side validation in Ajax mail form
- How to send automatic response after form submission without plugin
- Opening Modal popup on Ajax form submission
- Registration form AJAX check for existing username (simple version)
- Issue developing an AJAX form with WordPress
- Ajax show custom post data form & script
- Using AJAX on Contact-form the WordPress way
- Error while submitting form using AJAX and php
- Ajax contact form returnig 0
- Ajax Form data is not posted back to the get_results()
- Using AJAX for dynamic settings pages
- Ajax Form seems to post, but does not return
- Bad Request when adding new post via ajax form
- How to cache json with wp-super cache
- Get Previous & Next posts by Post ID
- AJAX request on the frontend always returns 0 if user is not admin
- Admin Notification after save_post, when ajax saving in gutenberg
- Using ajax on categories and wordpress loops
- Cannot load admin-ajax.php. No access-control allow origin*
- Initialize JS with an ajax loaded ACF form
- Nonces and Ajax request to REST API and verification
- wp_ajax action is not running
- WordPress AJAX calls not detecting language properly?
- AJAX issue – Uncaught SyntaxError when processing Zip File
- wp_verify_nonce doesn’t return true on server when it matches the nonce
- update_user_meta doesn’t work with AJAX
- Is it safe to manually sign a user in using AJAX?
- WordPress Admin AJAX Serialize
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- Loading post template that contains a nested loop with ajax
- Long Polling: Stuck in while loop
- Code run fast on a cronjob but slow with a do_action or ajax call
- update_post_meta using ajax
- Ajax comment form submit on frontpage alerts success but no insertion
- Wp mail does not work when Ajaxed to
- MySQL select query with ajax
- Exposing data using a custom WordPress API
- Use WP admin AJAX url to hide API key
- How can I wp_send_json data?
- Making POST request with AJAX returns a 400 error (without jQuery)
- Load image src through Ajax by ID?
- PHP session when called wp_ajax_nopriv
- What exactly does ‘authenticated’ mean for wp_ajax_nopriv?
- How to make image in TinyMCE clickable
- How to use Jeditable plugin with admin-ajax.php?
- WordPress Ajax Not Firing
- Disabling ajax code that does a POST request that ends in a 400 error code
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- How to prevent my external API call from being called by anyone but me (my site)
- get a bad request 400 on my ajax-admin.php file
- Trigger action via button
- Show ajax form resuslts in page
- Syntax error on query_vars while handling with Jquery
- Want to send ajax request in wordpress to a custom file in plugin
- How to send the checkbox value to email
- AJAX Call in Plugin Returns More than JSON
- Ajax take too long to return code
- problem when adding wp_editor with ajax [duplicate]
- Get wp-load.php PATH with wp_localize_script and JavaScript for plugin
- Ajax request to admin-ajax.php and window.location.href
- Capturing POST data
- delete attachment for one post without deleting actual attachment post
- Memberpress isn’t cooperating with WooCommerce
- where does my function output from load-* go?
- WordPress blocking polling request when signed into Admin
- $wpdb Ajax not redirecting to main page
- how reduce fetch/XHR response time
- Custom WP rest api endpoint only working on non https?