How to enable calculation in payment form?

  • miadarling
    Asked on January 1, 2018 at 3:10 AM
    Apologies for the delayed response. Please respond promptly. Is it possible
    to add eCommerce to each of these dropdown fields so that when all of them
    are selected across the bar, the "submit" button enables the client to
    actually link to pay for the service selected from the dropdowns? Also,
    could a percentage discount be applied in the calculation where repeat
    visits redeem a reduced price? For example, if they book the service
    monthly there's a 5% discount in the calculation, bimonthly in 10%, weekly
    20%, and then packages of all four is 15% off?
  • Ashwin JotForm Support
    Replied on January 1, 2018 at 3:31 AM

    Yes it is possible to achieve your requirement by taking advantage of our "Calculation Values" feature. You can also pass the calculated value to your payment field as well. You may like to take a look at the following guides which should help you:  

    Calculation values:  https://www.jotform.com/help/301-How-to-Assign-Calculation-Value  

    Form calculation:  https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget  

    Pass calculation to payment field:  https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field 

    Hope this helps.

    Do try it out and get back to us if you have any questions. 

  • Mia
    Replied on January 1, 2018 at 5:05 PM

    I need the Standard, Signature, and Deep Clean dropdown options to be conditionals. So when the user selects Standard and then 1 bedroom, this adds $10 versus when they select Signature and then 1 bedroom, this adds $20. So everything is dependent on if they select Standard, Signature, or Deep Clean. And then, on top of that, if reserving the service as Monthly it is 5% off, Bi Monthly 10% off, and Weekly 20% off.


    Please SHOW me how to do this and create a form like this for me to clone. I have seen the links provided and tried but I am very confused and don't know how to put it together. I started with this here: https://form.jotformz.com/80006013093643.


    Please see attached document with the mathematical pattern that needs to be applied for all dropdowns and conditionals.

    https://www.dropbox.com/s/8riktcb4s94ckls/Gregoria_Pricing%20Mathmatical%20Pattern.docx?dl=0

  • David JotForm Support Manager
    Replied on January 1, 2018 at 6:16 PM

    You would need to assign the values to the dropdown options: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

    And perform the calculation using a Form Calculation widget: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget 

  • miadarling
    Replied on January 1, 2018 at 8:43 PM
    Yes, I know this. I need an example for the first two combinations to clone
    please. Please add to the jotform that I created with this per the attached
    Dropbox document in last message:
    - Standard + 1 Bedroom + 1 Bathroom + Monthly
    - Standard + 2 Bedrooms + 2 Bathrooms + Bi Monthly
    - Signature + 1 Bedroom + 1 Bathroom + Monthly
    - Signature + 2 Bedrooms + 2 Bathrooms + Bi Monthly
    ...
  • liyam
    Replied on January 2, 2018 at 12:33 AM

    On your calculation, there is an extra + sign on the last part of the formula. This causes the calculation to malfunction. As the formula would appear (Field1 + Field2 + Field3 +).

    15148711412018 01 02 1330 Screenshot 10

    What you need to do is just remove the last plus sign and your form should work fine.

    If you have additional questions, please let us know.


  • gregoria
    Replied on January 2, 2018 at 1:20 PM

    I have removed the plus sign: https://form.jotformz.com/80006013093643.


    But this doesn't do what I've asked for it to do. I need you to add just the first two combinations here for me from the form that I've created. Also, why does it say "Booking Form 10790" in the calculation widget field? The amount isn't 10790 and it shouldn't say the text "Booking Form" there anyway - only numbers.


    Please do the following from this form per the attached Dropbox document in earlier message:


    Standard + 1 Bedroom + 1 Bathroom + Monthly

    Standard + 2 Bedrooms + 2 Bathrooms + Bi Monthly

    Signature + 1 Bedroom + 1 Bathroom + Monthly

    Signature + 2 Bedrooms + 2 Bathrooms + Bi Monthly

  • miadarling
    Replied on January 2, 2018 at 1:43 PM
    I have removed the plus sign: https://form.jotformz.com/80006013093643. But
    this doesn't do what I've asked for it to do. I need you to add just the
    first two combinations here for me from the form that I've created. Also,
    why does it say "Booking Form 10790" in the calculation widget field? The
    amount isn't 10790 and it shouldn't say the text "Booking Form" there
    anyway - only numbers. Please do the following from this form per the
    attached Dropbox document in earlier message:
    Standard + 1 Bedroom + 1 Bathroom + Monthly
    Standard + 2 Bedrooms + 2 Bathrooms + Bi Monthly
    Signature + 1 Bedroom + 1 Bathroom + Monthly
    Signature + 2 Bedrooms + 2 Bathrooms + Bi Monthly
    ...
  • liyam
    Replied on January 2, 2018 at 3:08 PM

    I'm trying to analyze to simplify the table from the Dropbox document. But there is a missing part on which I am not able to understand. Please correct me if I am not understanding these:

    Standard1 (1TB) --- every bedroom costs $10, every bathroom costs $10

    Standard2 (2TB) --- every bedroom costs $20, every additional bathroom costs $20


    On the other parts of the table, I'm at a loss on how it should compute the standard for $30, then the one for $50. I'm thinking there is a base rate. Are these the base amout for each?

    1. For the $30, the base rate is 147
    2. For the $50, the base rate is 227


    If I am missing something here, please let us know.

    Thanks.

    f 2

  • gregoria
    Replied on January 2, 2018 at 4:26 PM

    For the Standard, the base cost is $107. Then it's an additional $10 per bedroom. Then there's also a dropdown for an additional $10 per bathroom. Then repeat visits deem reduced price. So there's a last dropdown on the same bar for frequency. So monthly is 5% off, then bi monthly is 10% off, then weekly is 20% off.


    So for the Signature, the base cost is $177. Then it's an additional $20 per bedroom. Then there's also a dropdown for an additional $20 per bathroom. 


    Lastly, there's Deep Clean where the base cost is $277. Then it's an additional $30 per bedroom. Then there's also a dropdown for an additional $30 per bathroom. 

  • David JotForm Support Manager
    Replied on January 2, 2018 at 5:50 PM

    We apologize for the delay. Please note that we can guide you on how to build a form, however, building a complex solution goes beyond our main scope due to the high amount of questions we handled every day.

    That is the reason why it is hard for us to fully focus on the the mathematical pattern that needs to be applied in your form. So, my recommendation would be to hire a programmer to expedite the process. 

    Meanwhile, I have corrected what you have so far, basically you are operating the fields as String values:

    1514931791THIS 001 Screenshot 10

    Please click on the "brown" box to make it "black", which indicates that it is operated as a number:

    1514931888black Screenshot 21

    Now for the discount, you could add a new Form Calculation widget that you can hide, in order to obtain the total discount:

    1514932301discount 001 Screenshot 32


    Then you could perform the calculation through conditions: https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic 

    1) 

    1514933237one Screenshot 43

    2)

    1514933254two Screenshot 54

    3)

    1514933268three Screenshot 65

    Finally, add a new Form Calculation field to get the "Total - Discount":

    1514933371total 001 Screenshot 76

    Here is my form example: https://form.jotform.com/80017087426959 

  • gregoria
    Replied on January 2, 2018 at 10:50 PM

    Thank you. For the calculations between dropdown fields, I don't see how there's a differentiation between the standard combinations versus the signature and then versus the deep clean. The dropdown calculation value of a studio, 1 bedroom, 2 bedroom, 3 bedroom, 4 bedroom, and 5 bedroom are the same. There is just one field to write in for these calculation values, too. Please see attached screenshot: https://www.dropbox.com/s/c10hm6wbu3el7fv/Screen%20Shot%202018-01-03%20at%2012.31.51%20AM.png?dl=0.


    For example, if I select standard and have one bedroom I need to get a different calculation versus if I select signature and have one bedroom because this would add $10 rather than add $20. How do I do this exactly? Please show me step by step, or create an example with these different specific combinations using my Dropbox table.


    How do I make it so that the standard cleaning adds $10 per bedroom/bathroom, versus the signature adds $20 per bedroom/bathroom, and then the deep cleaning adds $30 per bedroom/bathroom? I have now changed the highlighted brown string to now be highlighted in black as a number.


    Also, the form calculation only has three dropdown fields in the equation where the above conditionals between standard/signature/deep clean seem to need more? And what does the 0-9 mean in the calculation? Where would I add the above $10 versus $20 versus $30 in the respective standard versus signature versus deep clean dropdown settings?


    Please do not share the same links as before, but kindly provide actual steps or an example form pertaining to my Dropbox table given earlier.

  • liyam
    Replied on January 3, 2018 at 12:51 AM

    I think a better approach here would be creating different set of fields for different categories.

    Example:

    you create a first field which allows the user to select these options:

    - Standard 
    - Signature
    - Deep Clean

    Then for each selection there you create your group of dropdown fields. for each selection above. Example:

    For Standard you have:
    - Studio/Bedroom dropdown field 1
    - Bathroom field 1

    For Signature you have:
    - Studio/Bedroom dropdown field 2
    - Bathroom field 2

    For Deep Clean you have:
    - Studio/Bedroom dropdown field 3
    - Bathroom field 3

    This way, you are able to set your specific values for $10 for Standard, $20 for Signature, $30 for Deep Clean.

    Then lastly, a single field that handles the computation for monthly since the 5%, 10% and 20% appears to be a static rate for all options.

    If you need clarification on this, please let us know.

  • miadarling
    Replied on January 3, 2018 at 7:43 AM
    Okay, yes this makes sense. And the frequency discount dropdown would be on
    the end of the bar as the last dropdown for each one?
    Does this mean that each set would be in its own row stacked on top of each
    other on the form? If so, is it possible to tighten the space gap
    significantly between the rows? Or could we add the Configurable List
    widget (https://widgets.jotform.com/widget/configurable_list) with the
    calculation widgets and eCommerce payment widgets inside of it, since this
    has the sleeker design layout I’d be looking for if we add rows to the
    form. The space between the rows is much shorter and nicer in the
    Configurable List widget.
    Or, would it make sense to add page breaks in the form instead of rows to
    keep the slender bar look? However the concern would be that the user can’t
    see that there other the other options of Signature and Deep Clean until
    they would click for the next page on the form.
    ...
  • Ashwin JotForm Support
    Replied on January 3, 2018 at 9:30 AM

    And the frequency discount dropdown would be on the end of the bar as the last dropdown for each one?

    Yes you can do that to calculate the amount or add discount on the price based on the frequency.


    Does this mean that each set would be in its own row stacked on top of each other on the form? If so, is it possible to tighten the space gap significantly between the rows?

    That depends on how you want the form fields to be placed. Yes we can align the form fields and remove gaps by injecting custom css code. Please let us know how you want the form fields to be placed after your form is built and we will help you with the required custom css code. 


     Or could we add the Configurable List widget https://widgets.jotform.com/widget/configurable_list) with the calculation widgets and eCommerce payment widgets inside of it

    Unfortunately no. It is not possible to add payment fields or calculation fields inside configurable list widget. It is not possible to add calculation in configurable list widget. 


    Or, would it make sense to add page breaks in the form instead of rows to keep the slender bar look? However the concern would be that the user can’t see that there other the other options of Signature and Deep Clean until they would click for the next page on the form.

    Yes if you add page break field in form, all the pages will be displayed separately and will be visible on the click of next button. Alternatively, you can also add "Form Tabs" widget in your form which will display a menu header to users. 

    Hope this helps.

    Do get back to us if you have any questions.

  • miadarling
    Replied on January 3, 2018 at 10:43 AM
    Thank you! I’ll check this out and get back to you. Also - Once the user
    submits the form, what do they see to submit their payment? Does a much
    larger window appear, and if so, how would this look for the iFrame itself?
    I can’t have arrows in the iFrame itself appear and it can’t take up a lot
    of space since it’ll be added on a small spot of the homepage of a website.
    ...
  • liyam
    Replied on January 3, 2018 at 11:37 AM

    Other than the option of showing them lined-up per row, how about using a show/hide condition on your form? This will keep your form to show just one line. This is because it will only show or make visible a set that have been selected by the form user.

    This guide on using the show/hide condition will give you a better idea on how you can use it on your form: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    With regard to the Thank you page, I recommend using a Thank you URL instead for you to be able to fully control the contents. Although you should be able to control the contents as well on a built-in thank you page on your form in order to limit the area of what appears. 

    You can check out these guides for more information: 

    https://www.jotform.com/help/211-Setting-up-the-Thank-You-Page

    https://www.jotform.com/help/38-Redirecting-Users-to-a-Different-Page

    In any case, feel free to build your form and we'll assist you through the process.

    Thanks.