Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author eventualo

    (@eventualo)

    At the moment you can add a validation check writing some javascript and include it in your theme footer.php (remind also to enquque jQuery in your theme):

    <script type="text/javascript">
        jQuery(document).ready( function($) {
            $('.alo_easymail_widget_form').on('submit', function(e) {
    			if( $('.alo_easymail_lists_table input [type=checkbox]:checked').length > 0 ) {
    				// ok, submit
    			} else {
    				e.preventDefault();
    				$('#alo_easymail_widget_feedback').addClass('alo_easymail_widget_error').html('Please select one or more lists').show();
    				return false;
    			}
    		} );
        });
    </script>

    I’ve not tested a lot, but I think it can be a good starting point for you.

    Thread Starter jenkit

    (@jenkit)

    Thanks. Altough something else is submiting that form whenever an e-mail is valid. There is onsubmit=”alo_em_pubblic_form();return false;” attribute on form tag. Is there a way to fire that function after checking if at least one list was selected?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘At least one mailng list checked’ is closed to new replies.