• Resolved ddhx5

    (@ddhx5)


    Hi,

    I would like to set up 2 newsletter checkbox for two list in buddypress sign-up form, is it possible? (With premium mailchimp account)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @ddhx5,

    Thanks for reaching out to us.

    This is possible with some custom code. You can use the following code to add the checkboxes for the user to select a list:

    function myprefix_show_list_choice_in_buddypress() {
      ?>
    <h4>Choose the lists you wish to subscribe to..</h4>
    <p>
        <label>
          <input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-1" /> List 01
        </label>
        <label>
          <input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-2" /> List 02
        </label>
        <label>
          <input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-3" /> List 03
        </label>
      </p>
    <?php
    }
    add_action( 'bp_before_registration_submit_buttons', 'myprefix_show_list_choice_in_buddypress' );

    You need to change the value to match the list ID.

    Thread Starter ddhx5

    (@ddhx5)

    Thank you!!

    Can you help me, where should I paste it? Which file and which line? Is set up one checkbox with the plugin, need I set up only the second with this code?

    Plugin Contributor Lap

    (@lapzor)

    I recommend you use a plugin like https://wordpress.org/plugins/code-snippets/

    Or put it in the functions.php of your child theme, if you use a child theme.

    As always, make a backup of your site before adding any code!!

    Thread Starter ddhx5

    (@ddhx5)

    Alright thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Buddypress 2 checkbox’ is closed to new replies.