What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    Zero Quantity Products appearing in Purchase Order Email Submission

    Asked by RACRUSWAL on July 21, 2014 at 05:41 AM


    Please can you help me out...  

    I have a form with custom code that Ardy helped me with previously.  The email submissions are showing zero quantities in the Purchase Order section. Ardy wrote some custom code for me previously that I have included in all my forms. Could you take a look at it again and see why it wont work on my forms now?




    <script type="text/javascript">
    var CC=jQuery.noConflict(false);
    var PaymentID = 440;

    function checkQuantities(quantityID){
    if(CC('#'+quantityID).val() == 0){
    var checkboxID = 'input_'+PaymentID+'_'+getsubID(quantityID);

    function resetandCheckQuantities(){
    var CCPaymentChkBoxes = CC('#cid_'+PaymentID+' span input.form-checkbox');
    var CCPaymentQuantities = CC("[id^=input_"+PaymentID+"_quantity]");
    var quantityID = CC(CCPaymentQuantities[i]).attr('id');
    function getsubID(quantityID){
    var p = new RegExp('(input)(_)(\\d+)(_)(quantity)(_)(\\d+)(_)(0)',["i"]);
    var m = p.exec(quantityID);
    if (m != null)
    return m[7];

    Thanks for your help,
    Page URL:

  • Profile Image

    Answered by jedcadorna on July 21, 2014 at 07:13 AM

    Hi Rachelle,

    I'll have to check and review Ardy's code then I'll get back to you once it is working. Just want to confirm that you wanted to hide the 0 value in your email notification, right?

    Thank you for your patience.

  • Profile Image

    Answered by jedcadorna on July 21, 2014 at 01:25 PM

    Hi Rachelle,

    The JS code embedded to your site is missing one "\". Just follow the image and add the missing back slash to your form source and the code provided by my colleague should work.

    The code you pasted above is correct the one in your webpage is the one missing a back slash.