Have a dropdown of users in product creation 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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Have a dropdown of users in product creation form

Viewing 1 reply thread
  • Author
    Posts
    • #93278
      cartaclaudio
      Participant

      Hi,

      When a new product is added, it might have other users(in my case artists). So on the product creation page, I have included an Select Input which I would like to display a list of users to add to the product.

      I have started some code but I am stuck on how to proceed with displaying the dropdown with my user list

      add_filter( 'wcfm_pm_custom_field', function( $custom_field, $product_id ) {
      	$field_id = md5( '_artists' );
      	if( isset( $custom_field[$field_id] ) && !$product_id ) {
      		$custom_field[$field_id]['value'] = 5;
      	}
      	return $custom_field;
      }, 50, 2 );
    • #93581
      WCFM Forum
      Member

      Hi,

      That’s possible.

      But which users will be there in that dropdown?
      And how that will be store for that product?

      Thank You

Viewing 1 reply thread
  • The topic ‘Have a dropdown of users in product creation form’ is closed to new replies.