• Resolved designersa

    (@designersa)


    I added this widget to my blog, it works very well but I found if subscribers send the subscription request without checking any checkboxes, they subscribe nothing.
    Is it possible to make “All Categories” checked by default?
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello !
    This functionality will interest me too.
    Thanks in advance.

    Plugin Author vandestouwe

    (@vandestouwe)

    That would looose the backward compatibility

    packdragon

    (@packdragon)

    I was looking for this solution as well. If a subscriber just enters an email address and hits submit, they subscribe to nothing. Possible solutions:

    1. Make a category selection a required field.
    2. If no categories are selected upon submission, select all by default.

    In the meantime, I used jQuery to make that checkbox checked by default. I can foresee this might cause confusion if a user who is already subscribed wants to alter their selections, but nothing they can’t fix by clicking the appropriate boxes. I get a lot more empty subscriptions than I do users altering their selections.

    For those who want to use my hackish solution…
    1. Follow the instructions on this page for setting up a custom script file in your theme: https://stackoverflow.com/questions/11159860/how-do-i-add-a-simple-jquery-script-to-wordpress
    2. In your script file, paste the following:

    //Select All Categories by default so subscriber doesn't have an empty subscription
    (function($) {
    	$(document).ready(function() {
    		$('.stc-checkbox input').prop('checked', true);
    	})
    })(jQuery);
    packdragon

    (@packdragon)

    Turns out the above solution doesn’t actually work. Neither using “prop” nor click() actually activate it and cause the categories to be entered with the submission. It’s just a cosmetic checkmark. I have instead resigned myself to just adding instructions using the following:

    //Add instructions to STC subscription.
    (function($) {
    	$(document).ready(function() {
    		$('.stc-categories').prepend('<div class="stc-instructions">*IMPORTANT: Select which categories you want to subscribe to below:</div>'); 
    	})
    })(jQuery);
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make “All Categories” checked by default’ is closed to new replies.