Tag limit

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!

Tagged: ,

Viewing 14 reply threads
  • Author
    Posts
    • #114867

      I want to set a limit on tags for my store but i can not find where that option is. i only see a category limit.

    • #115085

      Hello,

      Sorry we don’t have this feature.

      Thank You.

    • #115103

      Is there a way that i can add a tag with custom code or a plugin?

    • #115289

      Hi,

      Add the below code n your activated theme’s functions.php
      add_filter('wcfm_is_tags_input','__return_false');

      And add the below script in your theme’s js file,

      jQuery(document).ready(function ($) {
          $('.product_tags_as_dropdown').select2({
              maximumSelectionLength: 2  //replace with your tag limit
          });
          $('.product_tags_as_dropdown').select2('reload');   
      });

      Thanks.

    • #115374

      Hello, thanks for the code! but the code ensures that vendors can only use tags that are already there. and not being able to create more tags that don’t exist yet.

      • #115945

        Hello,

        In this case vendor can not create new tag. He can assign only existing tags.

        Thanks.

    • #116258

      is it also possible to get this feature but vendors are still be possible to make new tags? it is really important to my site.

    • #116418

      Hello,

      In this case please do not add the previously mentioned code,
      Add the below script in your theme’s js file,

      jQuery(document).ready(function ($) { 
      $('textarea#product_tags').on('keypress',function(e){
              var n = 3; //add your number of tags limitation
              var charCount = $(this).val().split(/[\.,\?]+/).length;
              if(charCount >= n+1) {
                  alert("You cann't add more than "+n);
                  e.preventDefault();
              }
          });
      });

      Thanks.

    • #116460

      Hello, I’ve added the code to my theme’s js file, but for some reason it did not work. Other example code did execute, but the code above did not.

    • #116868

      Hi,

      We assume that you have already removed previous code(otherwise new script will not execute), and you already checked that the new script are include in your site.
      Still you having the same problem please share us your site details with site url(Set as private reply), then we will do it for you.

      Thanks.

    • #116883
      This reply has been marked as private.
    • #116926
      This reply has been marked as private.
    • #116978
      This reply has been marked as private.
    • #117013
      This reply has been marked as private.
    • #117018
      This reply has been marked as private.
    • #117019
      This reply has been marked as private.
Viewing 14 reply threads
  • You must be logged in to reply to this topic.