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

    Need Form update on form calculation based on rules

    Asked by l33tseo on May 16, 2016 at 11:59 AM

    Hi guys,

     

    I have this form for which i am not able to apply some rules.

    https://form.jotform.com/61318667532156


    So i need to apply rules for all the 3 packages.

    1.) Tier 1 Articles, then the price should show as per the following rules.


    Word Count  - should be in multiple of 100 but minimum should be 300 words

     

     

    Price should be - 0.90$ per 100 words X Number of articles 

     

    Page URL:
    https://form.jotform.com/61318667532156

    JotForm count packages 3
  • Profile Image
    JotForm Support

    Answered by Charlie on May 16, 2016 at 01:30 PM

    Could you check this cloned form if it calculates correctly: https://form.jotform.com/61365612854963 

    To clarify, user needs the number of words in multiples of 100? If user entered 350? How does your calculation works in that case?

    In my case, this is how it is setup in the Form Calculation widget "Price":

     

    You can learn more about the math function floor() in this guide: https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference 

    This is how my formula works:

    ( ( floor("Word Count" / 100) ) * 0.90 ) * "Number of Articles" = price

    Example:

    Word Count: 350

    # of Articles: 2

    = ( ( floor (350 / 100) ) * 0.90 ) * 2

    = ( (floor (3.5) ) * 0.90 ) * 2

    = ( 3 * 0.90 ) * 2

    = ( 2.7 ) * 2

    = $5.4 is the price

     

    The floor() function is the opposite of rounding off, basically, I do not count the excess 50, I presume the word count should be in multiples of 100.

    Is that the price you are expecting? You can clone my form to have a version of it in your account by following this guide: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if that works.

  • Profile Image
    JotForm Support

    Answered by Charlie on May 16, 2016 at 01:44 PM

    Apologies, I just noticed that you have 3 packages. 

    I have updated the same cloned form I have. Here's the link to it: https://form.jotform.com/61365612854963 

    Now in this case, we will NOT add the formula directly in the Form Calculation widget. Instead, we will use Conditional Logic to perform the same calculation. You just need to edit my formula per package.

    1. First, here's the guide for the conditional logic: https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic. Check the section for the form calculation.

    2. These are my conditional logic for this case:

     

    3. This is how one condition is setup:

    You basically have the the "IF" statement and the "DO" statement. The rule and the action to be trigger. Simply add the formula in the text area field. You can insert fields by clicking the "Add Field" button.

     

    Simply clone my form and you should be able to have that version of the form in your account. I hope that helps. Do let us know if you need more help on this.

  • Profile Image

    Answered by l33tseo on May 16, 2016 at 01:55 PM

    Thanks guys. this is one of the support i have ever came across.

     

  • Profile Image
    JotForm Support

    Answered by BJoanna on May 16, 2016 at 02:55 PM

    On behalf of my colleague, you're welcome. Also thank you for your kind words. 

    Feel free to contact us if you have any other questions.