Remove county / state text and input field in wizard

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 1 reply thread
  • Author
    Posts
    • #43384
      Michael Gimm Holdensen
      Guest

      Hi
      We don’t use county/state in Denmark and so I want to remove it.
      I found another post and figured I needed to add the below code. Problem is, that the input field still remains (text did disappear).Also tried adding this CSS, but didn’t work… input#state {display: none !important;}

      Code:

      function wcfm_marketplace_settings_fields_0410_address( $address_fields ) {
      if( isset( $address_fields[‘state’] ) ) {
      $address_fields[‘state’][‘class’] = ‘wcfm_custom_hide’;
      $address_fields[‘state’][‘label_class’] = ‘wcfm_custom_hide’;
      }
      return $address_fields;
      }
      add_filter( ‘wcfm_marketplace_settings_fields_address’, ‘wcfm_marketplace_settings_fields_0410_address’ );
      add_filter( ‘wcfm_membership_registration_fields_address’, ‘wcfm_marketplace_settings_fields_0410_address’ );

    • #43484
      WCFM Forum
      Keymaster

      Hi,

      Please use this code –

      function wcfm_marketplace_settings_fields_0410_address( $address_fields ) {
      	$address_fields = wcfm_hide_field( 'state', $address_fields ); 
      	if( isset( $address_fields['state'] ) ) unset( $address_fields['state'] );
      	return $address_fields;
      }
      add_filter( 'wcfm_marketplace_settings_fields_address', 'wcfm_marketplace_settings_fields_0410_address' );
      add_filter( 'wcfm_membership_registration_fields_address', 'wcfm_marketplace_settings_fields_0410_address' );

      Thank You

Viewing 1 reply thread
  • The topic ‘Remove county / state text and input field in wizard’ is closed to new replies.