• Resolved rpladmin

    (@rpladmin)


    By default, given name and family name are not required fields on the membership sign up form. Is there a way of making them required?
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WC Lovers

    (@wclovers)

    HI,

    Yeah sure, please add this code to your site –

    add_filter( 'wcfm_membership_registration_fields', function( $registration_fields ) {
    	if( isset( $registration_fields['first_name'] ) ) {
    		$registration_fields['first_name']['custom_attributes'] = array( 'required' => 1 );
    	}
    	if( isset( $registration_fields['last_name'] ) ) {
    		$registration_fields['last_name']['custom_attributes'] = array( 'required' => 1 );
    	}
    	return $registration_fields;
    }, 50 );

    Add this code to your child theme’s functions.php
    In case you do not have child theme then add code using this plugin –?https://www.ads-software.com/plugins/code-snippets/

    Thank You

    Thread Starter rpladmin

    (@rpladmin)

    Many thanks – works great.

    Plugin Author WC Lovers

    (@wclovers)

    Great … you are always welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Membership Registration Form’ is closed to new replies.