Calculate the price with Tax included based on days and options selected

  • KittySmack
    Asked on October 6, 2014 at 12:30 PM

    We are using this as a hotel reservation form.  That being said, I need the ability to have the room rate change based on the day of the week.

    For example,

    If it is Sunday - Wednesday, the rates would be:

    1 bedroom - $55.00

    2 bedroom - $55.00

    3 Bedroom - $95.00

    Cottage - $135.00

     

    If it is Thursday - Saturday, the rates would be:

    1 bedroom - $95.00

    2 bedroom - $95.00

    3 Bedroom - $1355.00

    Cottage - $175.00

     

    Any help would be greatly appreciated.

     

    In addition, ideally, I would love to have the ability to set rates and availability based on dates, up to two years in advance, be able to close room types if sold out, etc.,   but it seems that this would require a database.  Along with the database, I would need a front end that I can update values based on single days, bulk updates based on from - to dates, or from - to dates based on the days of the week, for example, if the from - to dates are sept 1 - dec 31, I may only want to update thursday - saturday dates in this date range.
  • Ben
    Replied on October 6, 2014 at 1:06 PM

    Hi,

    We like to keep one issue/question per thread so I have moved your last part of the message to another thread here http://www.jotform.com/answers/439224

    What you would like to achieve with the date calculations can be done by duplicating the field that hold the prices and then show one or another based on the date.

    If you tell us which jotform you would like to have this set it we can give you a more detailed explanation of what should be used.

    Now in short as mentioned above would be do duplicate the field that has these prices and add a hidden date field that is pre-filled with current date. Then go into conditions and set it up so that it only shows one or the other depending on the exact day.

    Now if you want to select the prices based on the day that your visitor has selected to rent it, then you do not need to have the hidden field and can just set the conditions to match the day selected and based on that show and hide the proper fields.

    Again, I would suggest letting us know which jotform you would like to see this change in and based on that we would be able to give you more details on how to change and what to change.

    Best Regards,
    Ben

  • KittySmack
    Replied on October 7, 2014 at 11:13 AM

    Ah ok, that is a good solution... Thanks

     

    Here is the URL

     

    https://secure.jotformpro.com/form/41571012313944

     

  • Ben
    Replied on October 7, 2014 at 12:56 PM

    Hi,

    I have cloned your jotform and made the changes to it.

    Points to take a look at.

    I have cloned your radio option for different rooms available:

    Calculate the price with Tax included based on days and options selected Image 1 Screenshot 70

    Now I have changed the values of it to match what you wanted (on screenshot this is already shown).

    Calculate the price with Tax included based on days and options selected Image 2 Screenshot 81

    Calculate the price with Tax included based on days and options selected Image 3 Screenshot 92

    Now we need to set the conditions to show one options for one days and the other for other group of days.

    Now I have added 2 conditions to accomplish that to the ones that you already had:

    Calculate the price with Tax included based on days and options selected Image 4 Screenshot 103

    Now we make a change to Form Calculation named as Running on your jotform to calculate values from both fields.

    Calculate the price with Tax included based on days and options selected Image 5 Screenshot 114

    Now here comes the 'tricky' part.

    If we leave it as it is it will work as long as the visitor does not go from one options to another because then both values would be included (the values of the shown and of the hidden options).

    We must deal with that in your Running Form Calculations widget and this is how we set it up.

    We must click on "Show Advanced Options" and then make sure that there is a checkmark on "Ignore Hidden fields." option.

    Calculate the price with Tax included based on days and options selected Image 6 Screenshot 125

    Once this is set, click on Finish > Save and Preview :)

    It should not work as here: http://form.jotformpro.com/form/42795254416965

    If you want to clone it to your account for closer inspection please follow these steps: How to Clone an Existing Form from a URL.

    I do hope that it works just the way you wanted it so please let me know if it does. Also if you have any questions please let us know and we will do our best to answer them.

    Best Regards,
    Ben

  • KittySmack
    Replied on October 8, 2014 at 3:06 PM

    I have not looked at it yet, but, wow... Thanks for that help!!!

  • Ben
    Replied on October 8, 2014 at 4:08 PM

    Hi,

    You are welcome.

    Do let me know how it goes once you take a look at it and feel free to ask any questions you might have.

    Best Regards,
    Ben