First you need to add a class for all checkbox as having same id for multiple items is not recommended
<input type="checkbox" class="new_class" id='haet_mail_test_address' name="ckboxs[]" value="".$emails[$i]["user_email']."'>
Now we to change the way you are getting the values from checkbox
Change
var checkbox = $('#haet_mail_test_address').val();
To
var checkbox = $(".new_class:checkbox:checked").map(function(){
return $(this).val();
}).get();
console.log(checkbox); // check if you are getting the values here
Now in “checkbox” you will get an array of selected checkbox values. Now you can pass it to the ajax function as data
Related Posts:
- WordPress ajax success response
- contact form ajax empty response error message
- Wp mail does not work when Ajaxed to
- wp_mail 200 response but no mail sent
- wp_mail doesn’t work when logged in?
- Contact form – ajax, wp_mail
- Add Server Side validation in Ajax mail form
- How to send automatic response after form submission without plugin
- Sending email through Ajax without page refresh hangs on admin_ajax.php
- Sending email with wp_email and AJAX
- WordPress Ajax JSON success return no being recognized
- ASP.NET MVC controller actions that return JSON or partial html
- How to check if I am in admin-ajax.php?
- Ajax in a settings page (update_option is undefined)
- gettext does not translate when called in ajax
- Execute one AJAX request after another AJAX request finished
- Ajax and autocomplete
- admin-ajax.php vs Custom Page Template for Ajax Requests
- Load tinyMCE / wp_editor() via AJAX [duplicate]
- Is there a hook that fires before an ajax call?
- AJAX request from Chrome Extension to WordPress Website
- How to correctly load wordpress in a non WP script for AJAX request
- Why is admin ajax reloading my page
- Plupload in metabox – AJAX action not working in Class
- Why this plugin doesn’t work with media upload page?
- CPU usage: AJAX and Heartbeat API on admin pages
- Solve cors problem using rest api or ajax
- Can part of my WordPress website be headless?
- Nonces, AJAX, script variables & security in WordPress
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- Why would admin-ajax.php redirect to the home page for logged out users?
- wp_localize_script escaping my url – fix or alternative
- Admin Ajax and HTML5 Formdata
- Implementing an AJAX POST API call in wordpress
- WordPress ajax problem need wordpress expert?
- Ajax WordPress Login needs to be stayed in current page Url without redirecting
- wp_ajax function did not call
- 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?
- Popup or admin/update notice on post/page edit screen without page refresh
- Enqueue script in plugin is not working
- Single page site + pushState?
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- Ajax call does not work for this simple code
- WordPress ajax call returns a zero though die()
- wp_update_post onclick button using ajax
- Check ajax triggered from front-end or from dashboard
- Localize script not working
- Why, if a function accepts arguments, it fails on ajax calls?
- wp_ajax declaration confusing for Front end
- Delete ACF repeater field row on Front End
- No errors in the console but Ajax call doesn’t seem to be working
- WP_query offset seems to be counting draft post – AJAX load more
- Can’t retrieve any content from Ajax-loaded page
- adding ajax load more to display images from meta box
- Can’t load search results with ajax
- wp_ajax is not calling the action
- Deny dashboard access breaks ajax requests
- Run javascript upon successfully set featured image
- update_option in WordPress AJAX
- ajax in admin menu
- How to load dynamic option with ajax
- Register Template
- Loading pages via Ajax and displaying titles
- Ajax Favorite from foreach (how to specify which result result is processed)
- change wordpress pagination url after doing the request
- WordPress responds to the ajax request with readyState 1, 2, 3 before responding with 4
- Filter images from media library by guid meta field
- Counting Posts with multiple taxonomy and terms condition using MySQL and AJAX
- How to Object.freeze wp_localize_script
- WordPress New Post via ajax call
- 400 Bad Request getting on AJAX Call
- admin-ajax.php 403 errors – no caching, permissions are fine
- How to add Ajax to this Pagination i made?
- Adding user using admin ajax by a user with custom role
- How can I run two AJAX requests simultaneously in WordPress?
- Issue developing an AJAX form with WordPress
- Ajax global variable is not getting saved (returns null)
- WP admin ajax Pagination issue
- Change button text after ajax db update
- Jquery wrap permalink in a data-attribute?
- (Frontend AJAX) get post data WITH image thumbnail?
- Load .php file into div using ajax
- Native WordPress Video Shortcode Not Working After Post is Loaded via Ajax
- Ajax Function call is always returning 0 in front end(without plugin) [closed]
- AJAX Post from same domain to a wordpress page
- Add Ajax loaded posts to existing posts
- Using AJAX for dynamic settings pages
- Speeding up admin-ajax.php
- admin ajax is not working for non logged in users
- wp_localize_script not create variable in head section
- AJAX admin Internal 500 error Failed to Upload
- Class property not visible inside ajax callback function?
- Add “load more” functionality to an AJAX response
- Bad Request 400… jQuery ajax post of json data to wordpress admin-ajax.php
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- Successful ajax call returns lots of whitespace and text of code with 0
- How to submit a button automatically after every scheduled hours?
- At what stage does wp_ajax hooks gets applied during WordPress request?