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
- WordPress REST API FormData: Form Not Submitted When No Files Attached
- PHP “php://input” vs $_POST
- How to solve the error “SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.” in IE
- How to override WP_DEBUG for Ajax responses?
- Call to undefined function add_action()
- Registering AJAX callback function that is part of a class without instantiating the class in function.php
- Refused to execute script from ‘***’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled
- AJAX call using admin-ajax URL is returning 400 bad request
- Ajax with OOP doesn’t work
- Error 400 bad request using admin-ajax.php
- Using AJAX to return search form results
- Setting TinyMCE Content in wp_editor
- WP Ajax Action Not Picking Up Query String Parameter
- Implementing an AJAX POST API call in wordpress
- Ajax WordPress Login needs to be stayed in current page Url without redirecting
- Loading comments in ajax – comment-reply function missing $args
- Woocommerce update product price via AJAX
- How do I query posts by a sub value with the API?
- Enqueue script in plugin is not working
- Pagination Using ajax
- wp_ajax_ works fine but wp_ajax_nopriv_ returns HTML and not calling function
- Why is wp_localize_script returning false?
- Ajax call with javascript in post content (not enqueued)
- What’s the latest I can hook into wp_ajax_%?
- Nonce doesn’t validate in nopriv call
- WordPress – admin-ajax.php returns 502 Bad Gateway [closed]
- How to use ajax to get multiple outputs?
- Admin-ajax.php 400 error in custom theme
- Why does check_ajax_referer give a 403 error on https websites?
- WordPress is creating nonce as a logged in user but verifying it incorrectly
- Hide Load more Ajax button if there is no more users to load or less than the number?
- wp_ajax action is not run when ajax trigger
- Contact form – ajax, wp_mail
- Replace link with form to pass variables to javascript / ajax
- Can I use application/json content type in WordPress
- Admin Ajax always return 0
- Ajax call undefined index
- Is there a hook that fires after an ajax call?
- Dynamic Twitter card images
- How to pass value from ajax to php in no conflict mode?
- error_log() not working within wp_ajax_{action} handler
- Is there a way to add ajax hooks without editing the functions.php file?
- Implement AJAX to fetch pages or posts content in a WordPress custom theme
- AJAX is not submitting data to database
- about load more ajax
- How to use add_action(‘wp_ajax_[action name]’,…) for a specific page with condition?
- Is not using admin-ajax to ajax submissions okay?
- Allow guest to update custom post met using ajax
- Load more posts with Ajax and masonry
- Caching for logged in user and Ajax update
- AJAX function needed (toggle text) [closed]
- Call pre_get_posts inside ajax
- Translating wordpress foreach to ajax
- How to add a “Load more” button for the comment section in WordPress?
- How does the security of admin_ajax.php work?