How to make custom taxonomy/category required ?

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 – Ultimate How to make custom taxonomy/category required ?

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #24740
      d-n-13
      Participant

      Hello wcfm team,

      I’ve added some custom categories, is there a way to make them required ?

      See screenshots:

      https://ibb.co/kCFovJ
      https://ibb.co/eCuRhy
      https://ibb.co/j8Hq9d
      https://ibb.co/mHJV9d

      It’s really important to me.

      Thanks!

    • #24748
      WCFM Forum
      Keymaster

      Hi,

      I understand your requirement and we will definitely add support of custom taxonomy validation option in next update.

      Thank You

    • #24759
      d-n-13
      Participant

      Hi, thank you for your response,

      This is a good news thanks !

      Also, is it possible to get a temporary solution ? I tried to customize some of the code, I managed to show a red star on my custom taxonomy but I can still add products without choosing anything.

      wc-frontend-manager-ultimate/core/class-wcfmu-custom-validation.php

      <?php
      $WCFM->wcfm_fields->wcfm_generate_form_field( apply_filters( ‘wcfm_custom_validation_taxonomy_elements’,
      array( “wcfmcr_featured_img” => array(‘label’ => __(‘Featured Image’, ‘wc-frontend-manager-ultimate’) , ‘name’ => ‘wcfm_custom_validation_options[featured_img]’,’type’ => ‘checkbox’, ‘class’ => ‘wcfm-checkbox wcfm_ele’, ‘value’ => ‘yes’, ‘label_class’ => ‘wcfm_title checkbox_title’, ‘dfvalue’ => isset( $this->wcfm_custom_validation_options[‘featured_img’] ) ? ‘yes’ : ‘no’ ),
      “wcfmcr_product_cat” => array(‘label’ => __(‘Categories’, ‘wc-frontend-manager’) , ‘name’ => ‘wcfm_custom_validation_options[product_cat]’,’type’ => ‘checkbox’, ‘class’ => ‘wcfm-checkbox wcfm_ele’, ‘value’ => ‘yes’, ‘label_class’ => ‘wcfm_title checkbox_title’, ‘dfvalue’ => isset( $this->wcfm_custom_validation_options[‘product_cat’] ) ? ‘yes’ : ‘no’ ),

      “wcfmcr_product_cat2” => array(‘label’ => __(‘Categories’, ‘wc-frontend-manager’) , ‘name’ => ‘wcfm_custom_validation_options[cities]’,’type’ => ‘checkbox’, ‘class’ => ‘wcfm-checkbox wcfm_ele’, ‘value’ => ‘yes’, ‘label_class’ => ‘wcfm_title checkbox_title’, ‘dfvalue’ => isset( $this->wcfm_custom_validation_options[‘cities’] ) ? ‘yes’ : ‘no’ ),
      “wcfmcr_product_tags” => array(‘label’ => __(‘Tags’, ‘wc-frontend-manager’) , ‘name’ => ‘wcfm_custom_validation_options[product_tags]’,’type’ => ‘checkbox’, ‘class’ => ‘wcfm-checkbox wcfm_ele’, ‘value’ => ‘yes’, ‘label_class’ => ‘wcfm_title checkbox_title’, ‘dfvalue’ => isset( $this->wcfm_custom_validation_options[‘product_tags’] ) ? ‘yes’ : ‘no’ ),
      )
      ) );
      ?>

      Kind regards

    • #24763
      WCFM Forum
      Keymaster

      Hi,

      OK, I am sending you two updated files. Just place those at proper position and remove these custom codes.

      Two files –

      1. wc-frontend-manager-ultimate/core/class-wcfmu-custom-validation.php
      2. wc-frontend-manager/core/class-wcfm-library.php

      Thank you

    • #25001
      WCFM Forum
      Keymaster

      Hi,

      WCfM 4.1.4 has just released.

      It comes with this feature in-build.

      Kindly update yours and take a look.

      Thank You

Viewing 4 reply threads
  • The topic ‘How to make custom taxonomy/category required ?’ is closed to new replies.