How to do automatic calculation based on users answer

  • Marco_Romano
    Domanda del 7 agosto 2023 alle ore 06:54

    Buongiorno,

    Avrei necessità di applicare il pagamento con Paypal o Carta di Credito sui miei moduli. La cifra deve essere calcolata automaticamente sulla base di un campo precedentemente compilato. Esempio: all'utente viene chiesto di indicare il numero di persone che alloggeranno nella nostra struttura come anche le date di ingresso e uscita. Il prezzo da applicare è di 3€ per ospite per notte.
    Spero di essermi spiegata bene in modo da ricevere una risposta da parte vostra.

    Il mio piano di abbonamento con Jotform è ORO.

    Grazie e a presto

  • Joseph Jotform Support
    Risposta del 7 agosto 2023 alle ore 07:46

    Buongiorno ,

    Grazie per aver contattato il supporto tecnico di Jotform. Si, è possibile impostare un modulo in base a le condizioni da te indicate. Se non hai ancora impostato un modulo, allora puoi farlo come segue:

    1. Aggiungi un campo Numero al tuo modulo. Gli utenti inseriranno qui i loro dati.How to do automatic calculation based on users answer Image 1 Screenshot 60
    2. Inserisci un widget Form Calculation. Qui, nel menù a destra, imposterai i calcoli per calcolare il totale. Nel mio caso, numero di ospiti moltiplicato per il prezzo ad ospite (3).How to do automatic calculation based on users answer Image 2 Screenshot 71
    3. Aggiungi un element Purchase Order.How to do automatic calculation based on users answer Image 3 Screenshot 82
    4. Nel menù a destra, alla voce Payment Type imposta User Defined Amount e alla voce Get Price From, inserisci il widget Form Calculation.How to do automatic calculation based on users answer Image 4 Screenshot 93

    In questo modo potrai applicare un calcolo per il totale.How to do automatic calculation based on users answer Image 5 Screenshot 104 Se hai bisogno di una soluzione differente oppure applicarla ad un modulo che hai già creato, potresti indicarci l'URL del modulo a cui ti riferisci? Così potremo fornirti una soluzione più specifica per il tuo caso.

    Rimaniamo a disposizione per ulteriori chiarimenti.

  • Marco_Romano
    Risposta del 8 agosto 2023 alle ore 05:44

    Ok, grazie mille!

    Avrei necessità di aggiungere anche nel calcolo le notti passate nella nostra struttura.

    Esempio: 2 ospiti pagano 6€ di tasse a notte ed è quello che mi avete spiegato sopra. Se invece dovessi calcolare anche il numero di notti come faccio? Se questi 2 ospiti alloggiano per 2 notti dovrebbero pagare 12€ di tasse. Mi spiego?


    Grazie mille

  • Chris_L Jotform Support
    Risposta del 8 agosto 2023 alle ore 08:36

    Hi Niccolo Marco,

    Thanks for reaching out to Jotform Support. Unfortunately, our Italian 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 Italian, 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. If you want to compute the rate based on the number of nights the guest will stay, you will need to add another number element and update the formula in the Form Calculation widget. Let me show you how:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.
    2. Under the Basic tab, select the Number element and drag and drop it to your form.
      How to do automatic calculation based on users answer Image 1 Screenshot 40
    3. While in Form Builder, select the Form Calculation widget and click on the Wand icon to access its Settings.
    4. In the settings pane on the right, update the calculation as shown in the screenshot below.
      How to do automatic calculation based on users answer Image 2 Screenshot 51
    5. Finally, click on Save.

    Here is the form in action:

    How to do automatic calculation based on users answer Image 3 Screenshot 62

    Here is the link to the demo form. You can clone the form to review its settings.

    Reach out again if you need any other help.