Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    If you want to add some additional fields for subscriber form, you can use the following filters:

    1) sbscrbr_add_field – adding additional content. For example:

    function add_my_fields ( $content  ) {
       return $content . '<label>One More text Field<br /><input type="text" name="one_more_text_field" value="" /></label>';
    }
    add_filter( 'sbscrbr_add_field', 'add_my_fields' );

    2) sbscrbr_check – data processing after sending. For example:

    function check_my_fields ( $result  ) {
    
       // if there is some kind of error already
       if (  false === $result || ( is_string( $result ) && ! empty( $result ) ) )
           return $result;
    
       // put your verification code here
       if ( ! empty( $_POST['one_more_text_field'] ) ) {
         // do some action in case of success
         return true;
       }
    
        // if something is wrong
        return false;
    
    }
    add_filter( 'sbscrbr_check', 'check_my_fields' );

    Sincerely,
    BestWebSoft Support Team

    Thread Starter Saurabh Jain

    (@saurabhj91)

    Hi There,

    Please check the image LINK. From the form user is not getting subscribed even though he has filled the email id.

    What could be the issue?

    Thread Starter Saurabh Jain

    (@saurabhj91)

    Here is website link http://www.oneoone.ooo/

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    Thank you for the link.

    According to HTML structure of subscriber form, it is not generated by plugin functionality. Please try to use <?php echo sbscrbr_subscribe_form(); ?> code for adding subscriber block.

    Sincerely,
    BestWebSoft Support Team

    Thread Starter Saurabh Jain

    (@saurabhj91)

    Hi, I

    Thanks for support. actually i do not want unsubscribe checkbox. Is there any way to do so?

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    Please add the following code to the end of the “functions.php” of your theme:

    function display_subscriber_form() {
        echo function_exists( 'sbscrbr_subscribe_form' ) ? apply_filters( 'get_subscriber_form', sbscrbr_subscribe_form() ) : '';
    }
    function remove_unsubscribe_checkbox( $content ) {
        global $sbscrbr_options;
        $search = "<p>\n\t\t\t\t<label for=\"sbscrbr-checkbox\">\n\t\t\t\t\t<input id=\"sbscrbr-checkbox\" type=\"checkbox\" name=\"sbscrbr_unsubscribe\" value=\"yes\" style=\"vertical-align: middle;\"/> " . $sbscrbr_options['form_checkbox_label'] . "</label>\n\t\t\t</p>";
        return str_replace( $search, '', $content );
    }
    add_filter( 'get_subscriber_form', 'remove_unsubscribe_checkbox' );

    2) Use <?php echo display_subscriber_form(); ?> instead of <?php echo sbscrbr_subscribe_form(); ?> in the template of your theme.

    Sincerely,
    BestWebSoft Support Team

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    Since there is no reply from you, we consider this topic as resolved. We hope you’ve found the solution. If you have any questions, please feel free to contact us via our Help Center – https://support.bestwebsoft.com/.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How can i add the subscribe form using html?’ is closed to new replies.