• Resolved effiekyr

    (@effiekyr)


    Hi,
    Could you please help? We need to prevent negative numbers in product input fields (number field) and to set a number range.

    • This topic was modified 3 years, 4 months ago by effiekyr.
Viewing 1 replies (of 1 total)
  • Plugin Support David G

    (@gravid7)

    Hi @effiekyr

    Thanks for reaching out to us.

    You can follow the below steps to prevent negative values.
    1. Enable the Custom JS module and add the below code.
    2. Find the id of the number field from the module and use it instead of ‘wcj_product_input_fields_global_1’ in provided code.

    Also, if you want to make the minimum value 0 then you can set it instead of 1 from the code. Please make sure to add code position – footer.

    jQuery(window).ready(function(){
         jQuery('#wcj_product_input_fields_global_1').attr('min','1');
    });

    Let us know if you need any further help.

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent Negative numbers in field’ is closed to new replies.