Membership 2: Customize signup forms, direct link to forms

1) How can I customize the signup form Membership 2?

2) How can I have different signup form forms for each membership

3) I would like the direct URL to the signup form of each of my memberships. What is the structure?

Kind regards

  • Predrag Dubajic

    Hey @BGF,

    Hope you're doing well today :slight_smile:

    1) How can I customize the signup form Membership 2?

    Can you please give some more info regarding this question, which part exactly you want to change and how do you want it to look?

    2) How can I have different signup form forms for each membership

    I could use some more info here as well, are you looking to have different profile fields for different memberships or something else?

    3) I would like the direct URL to the signup form of each of my memberships. What is the structure?

    You can use shortcode for this, which is included in the plugin.
    You only need to change ID to the membership you want to link:
    [ms-membership-buy id="5" label="Buy now!"]

    Looking forward to your response.

    Best regards,
    Predrag

  • BGF

    @Predrag Dubajic

    1) I want to change: form fields, filed order

    2) I want different form fields for each membership

    3) I am aware that I can use shortcodes within a WP page. Thank you. I would like the direct URL to the signup form of each of my memberships. What is the structure? Example the structure in Membership 1 Pro was /register/?action=registeruser&subscription=41

  • Predrag Dubajic

    Hey BGF,

    1) I want to change: form fields, filed order

    You can use BuddyPress and BuddyPress Xprofile fields plugins and enable BuddyPress integration for M2, this will enable you to create custom fields for registration forms.

    2) I want different form fields for each membership

    Unfortunately this is not possible out of the box but I'm going to flag this thread for our second level support dev guys to see if they can think of some workaround.

    3) I am aware that I can use shortcodes within a WP page. Thank you. I would like the direct URL to the signup form of each of my memberships. What is the structure? Example the structure in Membership 1 Pro was /register/?action=registeruser&subscription=41

    Oh, you are looking for direct link, then you can use this but change the ID:
    /memberships/?membership_id=5
    If not sure you can always use the shortcode I pasted above and get the link from there :slight_smile:

    Best regards,
    Predrag

  • Hoang Ngo

    Hi @BGF,

    I hope you are well today.

    For the addition form parameters, you can use this code for printout. Please add this code to your theme functions.php or use mu-plugins:

    add_action( 'register_form', 'custom_ms_register_form_fields' );
    add_action( 'signup_extra_fields', 'custom_ms_register_form_fields' );
    
    function custom_ms_register_form_fields() {
    	$membership_id = isset( $_POST['membership_id'] ) ? $_POST['membership_id'] : 0;
    	if ( $membership_id == 0 ) {
    		return;
    	}
    
    	//from here, you got the membership_id, do your logic for membership id here
    }

    If you have any issues please don't hesitate to let us know so we can assist.

    Best regards,
    Hoang