• Resolved luissamfire

    (@luissamfire)


    Hello WCFM, I need help with my registration page where the vendors Set Up their info.

    In the field of “Find Location” that gets the user geolocation, could it be REQUIRED field so that vendors cannot carry on if they don’t add their store location?

    Here there is a picture to help view the problem:
    IMAGE
    Could you provide me a code snippet to fix this?

    Thank you for your help
    Kind Regards
    Luis

    The page I need help with: [log in to see the link]

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

    (@wclovers)

    Well, there is no field required for “Store setup widget”, as this widget is also optional.

    I can give you code to make this field required under vendor’s setting page.

    Thread Starter luissamfire

    (@luissamfire)

    Yes, I would appreciate it if I could have some code to make the field required. Thank you so much for your help!

    Thread Starter luissamfire

    (@luissamfire)

    @wclovers
    I have tried to create my own code snippet but didn’t work.
    Have you got something better than this code that doesn’t work:

    add_filter( 'wcfmmp_profile_settings','require_store_location_field');
    function require_store_location_field ($store_location) {
        $store_location ['required']= true;
        return $store_location;
    }

    Thank you for your help

    Plugin Author WC Lovers

    (@wclovers)

    Use this code –

    add_filter( 'wcfm_marketplace_settings_fields_location', function( $location_fields, $vendor_id ) {
    	if( isset( $location_fields['find_address'] ) ) {
    		$location_fields['find_address']['custom_attributes'] = array( 'required' => 1 );
    	}
    	return $location_fields;
    }, 50, 2 );
    Thread Starter luissamfire

    (@luissamfire)

    That’s amazing! Thank you so much for your help! It really solved my problem!
    Thank you, guys! One more time your customer service is always very helpful and supportive!

    Plugin Author WC Lovers

    (@wclovers)

    You are always welcome!

    If you ever get a chance then please leave a review for me 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Registration Find Location’ is closed to new replies.