How to make first name and last name mandatory ?

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Affiliate How to make first name and last name mandatory ?

Viewing 1 reply thread
  • Author
    Posts
    • #107755
      Avatarspacechain
      Participant

      I ask to Premium support, but I think a reply is faster here.
      From the forum : https://wclovers.com/forums/topic/few-issues/
      I got code for same question on vendor registration form, I suppose is quite similar for Affiliate.

      1) can you provide code for Affiliate form ?
      2) both Affiliate form and Vendor form modified files (please share also file names) are not effected by any plugins update ?
      3) why don’t make it simple for everybody and put on all fields (except the primary key one) an on/off switch like for added ones, so in this way you can avoid all international differences and help a persona customization ?
      thanks for reply

      9) as my final target is a big project, how much does it cost a specialized and focused remote code worker ? (This reply by mail
      Thanks again

    • #107993

      Hello,

      1> can you provide code for Affiliate form ?
      >> What we understand that you want to make firstname&lastname require field for affiliate registration, Add this below code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

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

      2> both Affiliate form and Vendor form modified files (please share also file names) are not effected by any plugins update ?
      >> For this requirement we have send you the script which is using wordpress “filter”. Any file modification is not required. You don’t need to any modification in core file plugin so this customization will not effected by any plugins update.
      3>why don’t make it simple for everybody and put on all fields (except the primary key one) an on/off switch like for added ones, so in this way you can avoid all international differences and help a persona customization ?
      >> Do you want a settings(on/off) which will decide the registration field will be required or not?
      In this case, our WCFM plugins have “filters”, so easily you can achieve this requirement by adding two lines of code.That’s why we don’t have added more settings for this.

      as my final target is a big project, how much does it cost a specialized and focused remote code worker ?
      >>Please contact us here for the purpose – https://wclovers.com/woocommerce-multivendor-customization/ with Scope of work for your site.

      Thanks.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.