How to create a list to calculate price of day booked

  • SouthHobartFC
    Asked on December 16, 2017 at 4:26 PM

    Also I actually wanted to create a list of the dates that would calclulate the total prices of days booked.

    Dates are:

    9 Jan

    10 Jan

    11 Jan

    30 Jan

    31 Jan

    1 Feb

    Totals are:

    1 Day = $60

    2 Days = $120

    3 Days = $160

    4 Days = $240

    5 Days = $300

    6 Days = $320

    But I couldn't work out how to do this.

    Thank you.

  • TREVON
    Replied on December 16, 2017 at 4:29 PM

    Would you kindly elaborate further on what you would like to achieve? Its not yet clear on what the above is to achieve for us to recommend a solution for the same.

  • SouthHobartFC
    Replied on December 17, 2017 at 4:09 PM

    I would like clients to choose the dates they wish to book. It could be a combination of the dates. I would like the form to then calculate the cost based on the number of dates they selected - i.e., say they selected the 11 Jan, 30 Jan and 31 Jan the payment due would be $160. If they selected 4 dates the cost calculated would be $240 etc.

    Is this possible?

    Thank you.

    Regards

    Frances

  • Mike
    Replied on December 17, 2017 at 5:07 PM

    This should be possible.

    1) Add two Form Calculation widget fields to the form.

    uchmv Screenshot 70

    You can also hide them.

    How to create a list to calculate price of day booked Image 1 Screenshot 81

    2) Calculate the number of days.

    Assign 1 calculation value to each day.

    s92lu Screenshot 92

    Add the Clinic Dates field to the calculation formula.

    How to create a list to calculate price of day booked Image 2 Screenshot 103

    3) Calculate total.

    Add the Update / Calculate Field conditions. One condition for each 'number of days'.

    How to create a list to calculate price of day booked Image 3 Screenshot 114

    1 Day.

    How to create a list to calculate price of day booked Image 4 Screenshot 125

    2 Days.

    How to create a list to calculate price of day booked Image 5 Screenshot 136

    And so on.

    4) Pass total to the payment field.

    Guide: How to Pass a Calculation to a Payment Field

    How to create a list to calculate price of day booked Image 6 Screenshot 147

    Let us know if you need any further assistance.

  • SouthHobartFC
    Replied on December 17, 2017 at 6:20 PM

    Thanks Mike, I will have a go at it. If any probs I'll get back to you.

  • SouthHobartFC
    Replied on December 17, 2017 at 7:15 PM

    Hi there,

    I've followed your instructions exactly but when I get to the "Pass total to payment field" I get stuck as the "total" is not showing in the dropdown for the "Get price from" in the "User defined amount" (see below).I'm not sure where I've gone wrong...

    Cheers

    Frances

     

    ?ui=2&ik=94273f7811&view=fimg&th=16066f4 Screenshot 10

  • Nik_C
    Replied on December 18, 2017 at 1:21 AM

    Your total field must be a Form Calculation widget field:

    1513578041Screen Shot 2017 12 18 at 7 Screenshot 10

    Only that field will show in Payment wizard in order to pass calculations.

    Hope it helps.

    Thank you!

  • SouthHobartFC
    Replied on December 18, 2017 at 2:28 AM

    Hi there,

    What calculation do I need to put into the Form Calculation widget that I have for "Total" I set up the "number of days" but there was no instruction for the "total". Would you advise what I need to do please?

    Regards

    Frances

  • Nik_C
    Replied on December 18, 2017 at 3:54 AM

    You do the same what my colleague Mike explained above, your total should be the form calculations widget.

    I checked your form and I see you did it, everything works fine.

    You just have to pass the calculation from form calculation field to Payment wizard:

    1513587198Screen Shot 2017 12 18 at 9 Screenshot 10

    If you face any issues please let us know.

    Thank you!

  • SouthHobartFC
    Replied on December 18, 2017 at 4:23 PM

    So just to be clear, I need to select typeA35 and this will point to the "Total" form calculation widget right?

    Thank you :)

  • Marvih
    Replied on December 18, 2017 at 5:28 PM

    That would be correct. TypeA35 is the name of your Total form calculation widget.

  • SouthHobartFC
    Replied on December 18, 2017 at 5:40 PM

    Excellent! Thank you :)