How to create a list to calculate price of day booked

  • Profile Image
    SouthHobartFC
    Asked on December 16, 2017 at 04: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.

  • Profile Image
    TREVON
    Answered on December 16, 2017 at 04: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.

  • Profile Image
    SouthHobartFC
    Answered on December 17, 2017 at 04: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

  • Profile Image
    Mike
    Answered on December 17, 2017 at 05:07 PM

    This should be possible.

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

    uchmv.png

    You can also hide them.

    2) Calculate the number of days.

    Assign 1 calculation value to each day.

    s92lu.png

    Add the Clinic Dates field to the calculation formula.

    3) Calculate total.

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

    1 Day.

    2 Days.

    And so on.

    4) Pass total to the payment field.

    Guide: How to Pass a Calculation to a Payment Field

    Let us know if you need any further assistance.

  • Profile Image
    SouthHobartFC
    Answered on December 17, 2017 at 06:20 PM

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

  • Profile Image
    SouthHobartFC
    Answered on December 17, 2017 at 07: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

  • Profile Image
    Nik_C
    Answered on December 18, 2017 at 01:21 AM

    Your total field must be a Form Calculation widget field:

    1513578041Screen Shot 2017-12-18 at 7.26

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

    Hope it helps.

    Thank you!

  • Profile Image
    SouthHobartFC
    Answered on December 18, 2017 at 02: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

  • Profile Image
    Nik_C
    Answered on December 18, 2017 at 03: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.58

    If you face any issues please let us know.

    Thank you!

  • Profile Image
    SouthHobartFC
    Answered on December 18, 2017 at 04: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 :)

  • Profile Image
    Marvih
    Answered on December 18, 2017 at 05:28 PM

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

  • Profile Image
    SouthHobartFC
    Answered on December 18, 2017 at 05:40 PM

    Excellent! Thank you :)