How to calculate the total amount depending on the selected item of the user?

  • SUNLITJETS
    Fecha de consulta 10 de abril de 2024, 12:10

    Hola, buenos días,

    Tenemos que describir un tour el cual contará con lo siguiente:

    Diferente opciones de hoteles para elegir - distintas tarifas por habitación - distinta tarifa para adultos y menores.

    Lo que ncesitamos es agregar distintos alojamientos con 2 o 3 tipo de habitación, a su vez que esa habitación tenga un precio (simple-doble-triple segun aplique) que los adultos y niños tengan una tarifa direnciada, cantidad de pasajeros.

    Una vez que el pasajero se decide por uno de esos alojamientos, que totalice el precio y que se abra una ventana para poner los datos de los pasajeros según cantidad de los mismos.

    Algo de esto es posible? Estuve viendo las plantillas ofrecidas, pero no encontré alguna que se ajustara a nuestros requisitos, quizás modificando alguna pre construída.

    Quedo atenta a su ayuda.

    Saludos,

    Gabriela




  • Gian_D Jotform Support
    Fecha de respuesta 10 de abril de 2024, 14:58

    Hi Gabriela,

    Thanks for reaching out to Jotform Support. Unfortunately, our Spanish Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Spanish, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. You can use Conditional Logic, and Dropdown widget to create your workflow. I created a sample form with the same functionality. Check out the screencast below:

    How to calculate the total amount depending on the selected item of the user? Image 1 Screenshot 120

    As you can see, I was able to create a simple computation that will provide a total amount depending on the selected item by the user. You can clone my demo form to make things easier, or you can do it on your own. Let me show you how to do it:

    1. In Form Builder, click on Add Form Element on the left side of the page, and drag, and drop two Dropdown widgets, Single Choice widget, and Short Text widget on your form.

    How to calculate the total amount depending on the selected item of the user? Image 2 Screenshot 1312. Click on the Gear icon of your Dropdown widget, and click on the Options tab.

    How to calculate the total amount depending on the selected item of the user? Image 3 Screenshot 142

    3. Enter your Dropdown options.

    How to calculate the total amount depending on the selected item of the user? Image 4 Screenshot 153

    4. Repeat the same steps for your Single Choice widget.

    How to calculate the total amount depending on the selected item of the user? Image 5 Screenshot 164

    Now, we need to set up a Conditional Logic to show, or hide the field depending on the answer on your Single Choice widget. Let's do it:

    1. Click on Settings in the orange navigation bar at the top of the screen, and in the menu that opens on the left side of the page, click on Conditions.
    2. Click on Show/Hide Field.

    How to calculate the total amount depending on the selected item of the user? Image 6 Screenshot 175

    3. Copy the condition settings below:

    How to calculate the total amount depending on the selected item of the user? Image 7 Screenshot 186

    Then, let's set up a condition to compute the total amount of the selected items:

    1. Click on Add Condition, and choose Update/Calculate Field.

    How to calculate the total amount depending on the selected item of the user? Image 8 Screenshot 197

    2. Copy the condition settings below:

    How to calculate the total amount depending on the selected item of the user? Image 9 Screenshot 208

    Take note that the value it was multiplied by depends on the value per adult at your hotel. I multiplied it by three as an example, but you should change it for your hotel per adult price, the same goes for your hotel per kid price. 

    3. Click on Save, then click on Add Condition again.

    How to calculate the total amount depending on the selected item of the user? Image 10 Screenshot 219

    4. Choose Update/Calculate Field, and copy the condition settings below:

    How to calculate the total amount depending on the selected item of the user? Image 11 Screenshot 2210

    5. Click on Save afterward.

    That's it. Let us know if you have any other questions.

  • SUNLITJETS
    Fecha de respuesta 12 de abril de 2024, 8:23

    Hello Gian_D,

    Thank you for your help, I think it might work just well.

    I have another question.

    The prices for adults also vary, for example 1 adult booking alone the price is a bit higher than 2 adults booking a room together, so my question is, is it possible to make this calculation? because now only sums and 2 adults but it's doubled. How to calculate the total amount depending on the selected item of the user? Image 1 Screenshot 40

    How to calculate the total amount depending on the selected item of the user? Image 2 Screenshot 51

    The idea would be that 1 adult cost 150 and 2 adults 180 for example.

    Let me know if it's possible to do.

    Thank you!


    PS: Also Is it possible to configure the hotel selection and so on the way its showing in the example, but without having to put a payment method? instead that after the hotel selection etc, it request a payment, the passenger can request a quote or contact us?

    How to calculate the total amount depending on the selected item of the user? Image 3 Screenshot 62

    Let me know, Thank you!


  • Mikhail Jotform Support
    Fecha de respuesta 12 de abril de 2024, 10:31

    Hi Gabriela,

    Thanks for getting back to us. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    We really appreciate your patience and understanding. 

  • Mikhail Jotform Support
    Fecha de respuesta 12 de abril de 2024, 11:31

    Hi Gabriela,

    Thanks for patiently waiting. Unfortunately, changing the price based on quantity is not possible using the Product List, as this is only possible if you create a Product List using the Single Choice elements, and Calculation Values and then create a condition to calculate selected products. Let me show you how it's done:

    I cloned the form that my colleague created for you and added Calculation Values to the Single Choice Element.

    1. Open your form in Form Builder, scroll down and click Single Choice Element. Click the Gear Icon
    2. In Options tab, turn the Calculation Values's toggle to On. 
    3. Assign values to the quantities. How to calculate the total amount depending on the selected item of the user? Image 1 Screenshot 50
    4. In the orange navigation bar at the top of the page, click on Settings.
    5. Click on Conditions on the left of the page.
    6. Now, click on the Single Choice condition and click the Pencil Icon
    7. Adjust the conditions like the conditions below and then click Save:How to calculate the total amount depending on the selected item of the user? Image 2 Screenshot 61How to calculate the total amount depending on the selected item of the user? Image 3 Screenshot 72
    8. That's it!

    This is what it looks like after adjusting the conditions and adding a calculation value:

    How to calculate the total amount depending on the selected item of the user? Image 4 Screenshot 83

    Additionally, by doing this, it will not require a payment method.

    Give it a try and let us know if you have any other questions.

  • SUNLITJETS
    Fecha de respuesta 15 de abril de 2024, 14:36

    Hello!

    Hello,

    I need to make this option happen.

    There will be 4 hotels from which the passenger can choose where to stay, each one has its own rate, I would like the passenger not be able of choosing two hotels at the same time, just one at a time, is this possible?

    How to calculate the total amount depending on the selected item of the user? Image 1 Screenshot 20 Screenshot 10

    Let me know please.

    Thank you


  • Mikhail Jotform Support
    Fecha de respuesta 15 de abril de 2024, 15:30

    Hi Gabriela,

    Thanks for getting back to us. I moved your other question to a new thread and will answer to you shortly here.

    Let us know if you have any other questions.

 
Su respuesta