Vendor registration form

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 2 reply threads
  • Author
    Posts
    • #68165
      r_guayaquil
      Participant

      Hi,

      how can i make the city and state fields to be required in the registration form?

      Thank you!

      Attachments:
      You must be logged in to view attached files.
    • #68911
      WCFM Forum
      Member

      Hi,

      Please add this cod to your child theme’s functions.php –

      add_filter( 'wcfm_membership_registration_fields_address', function( $address_fields ) {
      	if( isset( $address_fields['city'] ) ) { 
      	  $address_fields['city']['custom_attributes'] = array( 'required' => 1 );
      	}
      	if( isset( $address_fields['state'] ) ) { 
      	  $address_fields['state']['custom_attributes'] = array( 'required' => 1 );
      	}
      	return $address_fields;
      }, 50 );

      Thank You

    • #69093
      r_guayaquil
      Participant

      Thanks a lot for the code!

Viewing 2 reply threads
  • The topic ‘Vendor registration form’ is closed to new replies.