-
lauredc70Demandé le 22 avril 2024 à 08:04
Bonjour,
je souhaite créer un formulaire avec
1/ choix du nombre de participants
2/ inscription nom/prénom des participants
2/ en fonction du nombre de participants choisis le total au paiement correspond au nombre de participants (saisis plus haut dans le formulaire) x prix, et cela sans avoir à rechoisir dans le panier le nombre de participants
J'ai crée un formulaire PAF cousinade ici
et je ne trouve pas le moyen de relier le nombre de participants avec le montant total du paiement.
Avez-vous une idée ?
Merci
-
Joseph Christian Jotform SupportRépondu le 22 avril 2024 à 10:32
Hi lauredc70,
Thanks for reaching out to Jotform Support. Unfortunately, our French 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 French, 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, coming back to your question, you can do this by adding a Form Calculation widget to your form and passing the calculation to the payment field. Let me show you how:
- In Form Builder, click the Add Form Element on the left side of the page.
- Under the Widgets tab, search for Form Calculation Widget and add it to your form.
Then, add the calculation to the Form Calculation widget. Check out the steps and screencast below to see how it's done:
Now, let's change the Payment Type of the Stripe Integration from Sell Products to User Defined Amount so we have an option to capture the total from the Form Calculation widget. Here's how:
- Select your payment field, and click on the Wand icon to open Payment Settings.
- Change the Payment Type to User Defined Amount.
- On the Get Price From dropdown, select the Form Calculation Widget field (Total: in my example)
- Click Save to apply the changes.
Here's my result:
You can also clone my cloned form here.
Let us know if you have any other questions.
-
lauredc70Répondu le 22 avril 2024 à 12:27
Thank you so much for your answer and your help. It works fine and helps me a lot.
Actually I've got another question :
I would like to display the number of fields to enter depending on the number of people expected. So if 2 people are present only 2 fields "Please enter the first and last names of participants over 10 years old" will not be offered more. And if 5 is selected, 5 fields will be dynamically proposed. Is it possible ?
Thank you for your help
-
Joseph Christian Jotform SupportRépondu le 22 avril 2024 à 13:31
Hi lauredc70,
Thanks for getting back to us. Unfortunately, we can't conditionally update the Dynamic Textbox widget fields based on the value entered in another field. However, you can do the other way around which is to let your users enter the participants' names first, then pass the total number of participants to a form calculation widget. Let me show you how:
1. In Form Builder, click the Add Form Element on the left side of the page.
2. Under the Widgets tab, search for Form Calculation Widget and add it to your form.
3. You can also set this to hidden if you don't want your users to see this.
4. Then, select your dynamic textbox by clicking on the wand icon to open Widget settings.
5. Set the Count textboxes? to Yes.
6. Once that done, select the new form calculation widget that you've added by clicking the wand icon to open widget settings.
7. Add the Dynamic Textbox field to the formula by clicking on the Add Field button.
8. Click Save to apply the changes.
Then you can update the formula on the initial Form Calculation widget that you've added previously to get the total amount of price. Set the new formula like you see below:
Checkout the screencast below to see my results:
That's it. If you'd prefer to let the users input the number first and then show the corresponding number of participant fields then, I'm afraid, you would need to use multiple short text fields instead of the Dynamic Textbox widget. Use conditional logic to show/hide the short text fields based on the user's input value.
Give it a try and let us know how it goes.
-
lauredc70Répondu le 24 avril 2024 à 04:25
Hello,
and thank you for your answer. It helps me a lot and your explanation is very clear.
However, there seems to be a bug. Hidden fields appear on the form.
The total one and the invoice.
Thank you
-
Israel Jotform SupportRépondu le 24 avril 2024 à 06:27
Hi lauredc70,
Thanks for getting back to us. It would help us to understand what’s happening if you could take a screenshot and send it to us. We have a guide here explaining how to do that.
Once we hear back from you, we'll be able to help you with this
-
lauredc70Répondu le 24 avril 2024 à 06:36
-
Victorino_S Jotform SupportRépondu le 24 avril 2024 à 08:54
Hi Laure,
Thanks for getting back to us. As for your other question, I've moved that to a new thread. You can check that out here.