# chatbot/8.8.1/js/email_subscription.js

WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services, version 8.8.1. 23 lines.

- Page: https://pluginprobe.com/plugins/chatbot/8.8.1/code/js/email_subscription.js
- Raw: https://pluginprobe.com/plugins/chatbot/8.8.1/raw/js/email_subscription.js
- Modified: 2026-09-28T11:58:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/chatbot/8.8.1/code/js/email_subscription.js#L10-L20`.

```javascript
jQuery(document).ready(function($) {
    // Check/uncheck all checkboxes
    $('#wpbot_checked_all').on('change', function() {
        $('.wpbot_email_checkbox').prop('checked', $(this).prop('checked'));
    });

    // Delete confirmation and form submission
    $('#wpbot_submit_email_form').on('click', function(e) {
        e.preventDefault();
        
        var checkedLength = $('.wpbot_email_checkbox:checked').length;
        if (checkedLength === 0) {
            alert('Please select at least one record to delete.');
            return false;
        }

        if (confirm('Are you sure you want to delete the selected ' + checkedLength + ' record(s)?')) {
            $('input[name="wpbot_email_subscription_remove"]').val('1');
            $('#wpcs_form_sessions').submit();
        }
    });
});

```
