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

    Calculation issue

    Asked by SparkRehab on March 10, 2015 at 09:47 AM

    Hi:

    I have an invoice form.  I offer a series of services and they are delivered at a set pay rate.  When some one enters the number of hours or km driven for these services and a pay rate the calculation is correct and good.

    However, one type of service called "Treatment Costs" is not based on a set pay rate, but rather on the price to purchase a product.  As an example a book for $18.87.  

    Problem is that the rate of pay is part of the calculation but if I add a box to insert a price it is not part of the calculation and missed in the total for the invoice.   If I insert all possible prices between $0.01 to $100.00 the box would be huge and I expect would not hold that many amounts.

    Is there a way to add another box(es) into the calculation.  For example a box for $ and one for cents which combine to give a final price and add to the calculation.  Or can I put a 1000 lines in a drop down box?

    There must be a simple solution and you likely have an idea on how to do this.

     

    Thank you

     

    Doug

    Page URL:
    http://www.sparkrehab.com/example.html

    problem purchase prices product
  • Profile Image

    Answered by Shadae on March 10, 2015 at 12:17 PM

    Hi Doug,

    To confirm, you would like to add an additional field to that would be included in the total calculation? 

    You would prefer to use a text box for the additional field?

    If that is the case, a text box field can be added when using the calculation field. After reviewing form, I am able to determine how you would like for your calculation to work.

    Can you edit your form to include the additional field and inform us exactly how you would like to calculation to work, we would be happy to assist you with getting the desired outcome.

    Thank you.

  • Profile Image

    Answered by SparkRehab on March 10, 2015 at 06:00 PM

    Hi:  The form at http://www.sparkrehab.com/example.html is now how I would like it except for one small issue:

    Client 1 - 9 fit nicely but 10 - 25 I can not get to align as do the first ones.  

    If you can fix that or tell me how I would appreciate it.  

    However the main issue is getting the $ Value "Cost of Therapy" to add a value to the calculation box.  Only one amount  (Length of Service x Rate of Pay) or (Length of Service x $ Value Cost of Therapy will be calculated at one time.  

    Your help is really appreciated.

     

    Doug

  • Profile Image
    JotForm Support

    Answered by Welvin on March 10, 2015 at 06:59 PM

    Hi Doug,

    For the alignment of the field, I've moved it to a new thread. Here's the link: https://www.jotform.com/answers/530766. We will look at it separately.

    For the main issue, I'm sorry, but I can't think of an easiest way to accomplish this rather than doing this conditionally.

    https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Caculation-into-a-field-using-a-Condition

    Check this cloned version of your form: http://www.jotformpro.com/form/50687067330961. Fill the client 1 section and you will notice the following:

    a. If the 'Type of Service' field is equal to "Cost of Therapy", the "Client 1 Total" will only calculate the "Length of Service x $ Value "Cost of Therapy"

     

    b. If the 'Type of Service' field is NOT equal to "Cost of Therapy", the "Client 1 Total" will only calculate the "Length of Service x Pay Rate"

     

    Repeat this method for the rest of the fields. Let us know if you need further assistance about this matter.

    Thanks

  • Profile Image

    Answered by SparkRehab on March 12, 2015 at 10:01 AM

    Hi:  At http://www.weebly.com/weebly/main.php is the form now that I have changed the 4 first clients using conditions.  I renamed some boxes simply to make identification easier in the process of applying conditions.

     

    One minor problem.  When I insert

    If "Type of Service" is equal to "Cost of Therapy - Purchase"

    Insert {Length of Service 1}{Cost of Therapy - Purchase 1} into calculation 1

    and then

    If "Type of Service " is not equal to "Cost of Therapy - Purchase"

    Insert {Length of Service 1}{Pay Rate 1} into calculation 1

    the the first equation allows both to work.  So if I input Type of service is "Cost of Therapy - Product" I can enter either a "Pay Rate 1" and get an answer or a "Cost of Therapy" value and get an answer.

    Is there any way of making it so if Cost of Therapy - Purchase is selected you can not get a calculation if by mistake you input a pay rate?

    If you go to the example and input you will see what I mean.  You can iput both and they calculation changes back and forth.

    Sorry top keep bothering you

    Last time I hope.

     

    Doug

     

  • Profile Image
    JotForm Support

    Answered by Welvin on March 12, 2015 at 11:15 AM

    Hi Doug,

    You can simply add another conditional logic to hide "Pay Rate" field and show "$ Value Cost of Therapy" field if "Cost of Therapy" is selected in the 'Type of Service' field.

    Please check back my form: http://www.jotformpro.com/form/50687067330961 to see the changes.

    Then to clear the values when an option is hidden, you have to "enable" it in the Preferences > Advance settings:

    Thanks