WordPress.org

Forums

Subscribe2 Widget Pro
[resolved] Add checkboxes to subscription form, (2 posts)

  1. jusgriff
    Member
    Posted 1 year ago #

    Is it possible to add a checkbox in the subscription form which requires the user to tick a required check box before they can signup up. Adding this via html in the widget section that allows you to add additional content inserts this before or after the POST content meaning it doesn't get included in the form.

    How can I include this in the form element?

    https://wordpress.org/plugins/subscribe2-widget-pro/

  2. Devin Walker
    Member
    Plugin Author

    Posted 1 year ago #

    Version 2.1 has two new actions:

    subscribe2_widget_pro_form_fields_before and subscribe2_widget_pro_form_fields_after

    This allows you to add elements WITHIN the form tag like so:

    add_action('subscribe2_widget_pro_form_fields_before', 'my_custom_action');
    
    function my_custom_action(){
    	echo "<label>Checkbox</label>";
    	echo "<input type='checkbox' />";
    }

    It's up to you to decide what happens with these form elements once added.

    Please let me know if you have anymore questions!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Subscribe2 Widget Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic