The action should be part of the data object:
var formdata = new FormData();
formdata.append('name', 'This is Name');
formdata.append('action', 'plugin_save');
$.ajax({
url: 'admin-ajax.php',
type: 'POST',
data: formdata,
contentType:false,
processData:false,
success: success,
error: error
});
Related Posts:
- Admin Ajax and HTML5 Formdata
- Using admin-ajax prevents regular php form submission
- How to display contact form 7 form in vanilla js without jquery in frontend
- Ajax show custom post data form & script
- Bad Request when adding new post via ajax form
- Send POST data using XMLHttpRequest
- JavaScript implementation of Gzip
- FormData append not working
- Nonces and Cache
- Contact Form 7 Custom Post Action
- ajax – why multiple calls to wp_create_nonce() return same value?
- How to properly use wp.ajax.post?
- Custom PHP endpoint for a plugin’s AJAX call
- How to link WordPress heartbeat to ajax form
- WordPress Ajax Login without page reload
- Dynamically changing navigation links (next and previous) via AJAX
- Drag and drop multiple file upload using Ajax WordPress
- Quick Edit: Selected Custom Taxonomy Not Refreshing After Save
- Vue.js + AJAX Shortcode
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- fetching via fetch/ajax gutenberg block data from third party
- ajax and nonce when JavaScript is in a seperate file
- how to use reCaptcha v3 in wordpress custom login form?
- admin-ajax.php HTTP400: BAD REQUEST – The request could not be processed by the server due to invalid syntax
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- AJAX issue – Uncaught SyntaxError when processing Zip File
- Prevent page reload after ajax form submission
- wp-admin AJAX with Fetch API is done without user
- submitting form via admin-ajax.php returns 0
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- Help with AJAX front end comment moderation
- jQuery Ajax passing empty parameters to my function?
- Using ajax with wordpress
- Ajax Modal Flickers When Opened Multiple Times
- Ajax image upload with media_handle_upload and form.js
- Show Post Content with AJAX
- splitting the URL using jQuery
- AJAX Load more on CPT returning random posts
- Ajax post returning full html page as response
- Refresh Markercluster after ajax call
- Sending variable from ajax on form submit
- Making an ajax request from a different domain
- Performance optimization of tree like structure
- Radio buttons live refresh in the customizer
- How do I pass the id of my widget to javascript in the form function?
- Specify ABSPATH in jQuery url
- ajax form is returning the dreaded “[HTTP/1.1 400 Bad Request” and a zero
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- How to disable drag-and-drop upload function in Media Library?
- javascript ajax and nonce
- Output multi-steps form results in same page
- Making POST request with AJAX returns a 400 error (without jQuery)
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Using get_theme_mod in php ajax form doesn’t work
- How to create a form button that executes a function?
- Is there a better way to access transients using javascript
- How to stop being directed to admin.php after sending request to admin-ajax.php
- Run javascript upon successfully set featured image
- Ajax page load without reload
- Get uploaded attachment width & height and attachment ID after upload them
- Updating failed. The response is not a valid JSON response. specific to my browser when I include javascript in my html
- Uncaught TypeError: Cannot read properties of undefined (reading ‘message’) [closed]
- Refresh checkout fields on add to cart with order bump
- 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
- Refresh Gutenberg with JS for it show updated post
- javascript onClick update user_meta from jquery.ajax
- how to make sure js is enabled before executing php function
- How to Object.freeze wp_localize_script
- ERROR while passing data from JS to PHP via AJAX
- React to AJAX adding to the page
- Download doccument on server rather than clients browser
- Using existing ajax data that is loaded into page
- Registration form AJAX check for existing username (simple version)
- Issue developing an AJAX form with WordPress
- Ajax call from Plugin using Class
- How to safely pass post_id and user_id via AJAX to the backend (prevent user from changing it via JS)?
- AJAX form not working, still reloads on submit
- Get post details with pure javascript ajax
- Ajax WordPress pass post URLs
- Jquery wrap permalink in a data-attribute?
- Ajax contact form returnig 0
- Session variables lost during Ajax calls – WordPress – Sage Starter Theme
- Ajax Form data is not posted back to the get_results()
- Using AJAX for dynamic settings pages
- ‘Dehighlighting’ navigation once clicked
- How do I convince this button to do something when it is clicked?
- Ajax Form seems to post, but does not return
- AJAX admin Internal 500 error Failed to Upload
- Using Javascript Callback from plugin in a theme
- WordPress Ajax send response on every iteration of a loop
- Running js in html code with same content
- How to get current_user_id from wordpress in node js?
- AJAX call not initializing for non-admins in WordPress
- Escaping admin_url output being passed to js (esc_js vs esc_url)
- How to submit a button automatically after every scheduled hours?
- WordPress REST API FormData: Form Not Submitted When No Files Attached
- JQuery UI Autocomplete/Autosuggest WordPress
- WordPress send Ajax where click button