Mandatory fields in product edit screen

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 Mandatory fields in product edit screen

Viewing 5 reply threads
  • Author
    Posts
    • #88786
      Zeljo
      Participant

      Hello,

      I would like to make the price mandatory in the product edit screen, is this possible? What I want to do is to remove the ability for someone to add free products.

      Thanks

    • #90284
      Zeljo
      Participant

      No support for paid plugin? Where can I get my money back?

    • #90303
      sdel_nevo
      Participant

      Hi

      I beleave you can set this in the product custom validation area in the settings section

      Not sure if that’s enabled with WCFM Ultimate or the groups and staff plugin to be honest, I’ve got both and can’t remember which one had this capability,

      Steve

    • #90811
      WCFM Forum
      Keymaster

      HI,

      I would like to make the price mandatory in the product edit screen, is this possible?
      – Yeah right, you may set this from WCFM Admin Setting -> Product Custom Validation – https://ibb.co/XxxC7br

      Thank You

    • #91487
      Zeljo
      Participant

      This does not work, I’ve checked the validation for the price, but it still does not validate it. But, it doesn’t matter, because due to the integration with WooCommerce Booking, I need to make the _wc_booking_block_cost mandatory. This is the Block cost, and I need to validate this, how can this be done? IS there a filter for this?

      Thanks

    • #91580
      Sushobhan
      Keymaster

      To make block cost field mandatory you can use the following code snippet

      function make_booking_block_cost_required($fields) {
          $required = array(
              'custom_attributes' => array(
                  'required' => true,
                  //'required_message' => 'Change default required message from here',
              ),
          );
          $fields['_wc_booking_block_cost'] = array_merge($fields['_wc_booking_block_cost'], $required);
          return $fields;
      }
      add_filter('wcfm_wcbokings_cost_fields', 'make_booking_block_cost_required');

      Add this 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/

Viewing 5 reply threads
  • The topic ‘Mandatory fields in product edit screen’ is closed to new replies.