-
Julien_CompainDemandé le 2 août 2023 à 02:41
Comment pour chaque ligne calculer "longueur" x "hauteur" dans "Surface" ?
-
Leonidas_D Jotform SupportRépondu le 2 août 2023 à 07:22
Hello Julien,
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, let me help you with your question. Unfortunately, you can't do any calculations in the Configurable List widget since they employ a different script, and it is impossible to acquire the values for the calculations from each row. But, you can try using the Input Table instead, since it allows you to assign values and do calculations.
Let me show you how to perform calculations using the Input Table:
- On the Form Builder, under the Build tab, click the Add Form Elements, and select Input Table on the Basic tab.
- Click the Gear icon, and select the Fields tab.
- In the screencast below, as an example, I selected Numeric Textbox. This will limit numbers only.
- Then, on the orange ribbon, select the Settings tab.
- Click the Conditions on the left panel, and select the Update/Calculate Field option. Take a look at the screencast on how the calculation condition was set up.
Here's the screencast of the result:
Give it a try and let us know how it goes.
-
Julien_CompainRépondu le 2 août 2023 à 10:03
Thanks a lot for your answer, Leonidas (great first name by the way),
First of all, I appologies, I sent my help requet 3 times on the website and another one by the chat.
To defence myself, both of them dont work very well, the website desplayed an error messsage and the chat kept appearing and deseapering.
Now problem is with the input table, the user cannot add as many rows as he need.
How do you manage that ?
-
Carlo Jotform SupportRépondu le 2 août 2023 à 12:17
Hello Julien,
Thanks for getting back to us. I'm sorry that you're having difficulty with this. Adding multiple rows with fillable fields is possible using our Configurable List Widget. Let me walk you through it:
- On your Form Builder, go to the Widgets tab and search and drag the Configurable List Widget to your form.
- You may change the setup of the fields by editing the Field Configuration.
- At the bottom part, you will see 'Minimal rows number' and 'Maximal rows number'. You can limit how many rows you would like them to add or you can add more by default.
- Click Update Widget for you to save the changes.
However, the Configurable List Widget doesn't have an auto-expand option. You can check this guide to learn more about How to Set Up the Configurable List Widget.
Moreover, If you want to perform a form calculation in the Input Table element, you can use the Form Calculation Widget. Here's how:
- On your Form Builder, Add the Input Table from the Basic Element tab and go to the Widgets tab and search and drag the Form Calculation Widget to your form.
- Click the Wand icon for you to be directed to the Widget Settings.
- After that, you can now select Sub-fields to use in the calculations and just hit Save.
If you want something that has a fillable field that adds up multiple rows and a form calculation, I would suggest using the Spreadsheet Widget. Let me show you how to set that up:
- On your Form Builder, go to the Widgets tab and search and drag the Spreadsheet Widget to your form.
- Click the Wand icon for you to be directed to the Spreadsheet Widget Settings.
- You can manually input the 'Number of rows' and 'Number of columns.
- On the 'Column Labels', you can set the names for each column order.
- You can use the 'Default values' to add formulas.
Give it a try and let us know if there’s anything else we can help you with
-
Julien_CompainRépondu le 3 août 2023 à 02:06
Hello Carlo,
Thank you, i am going try the Spreadsheet Widget.
-
Julien_CompainRépondu le 3 août 2023 à 05:06
Hello Carlo,
Since users can add by themself a new row, i created 11 rows with 3 columns.
Column 1 x column 2 = column 3
A x B = C
C11 = C1 + C2 + ... + C10
Can I send the value in C11 in another widget in order to make another calculation ?
-
Ross_JRépondu le 3 août 2023 à 09:14
Hello Julien_Compain,
Thanks for reaching out to Jotform Support. I am sorry for the confusion. Unfortunately, it is not possible to extract cell data from the Spreadsheet widget and pass it to another form field or use it on a condition. Or use the Configurable List widget to get a calculation.
A possible workaround is to use the Input Table element instead as mentioned by my colleague Leonidas, which allows you to do calculations, extract a specific cell and pass the data to another form field. Let me show you the process on how I did it:
1. Add the Input Table and Number field in your form. Set the Input Type of the Input Table as Numeric Textbox.
2. Use the Update/Calculate Field condition. In the Update/Calculate Field condition, click on Add Field button.
3. Select the Input Table field.
4. Select or click on the box that you want to add on the calculation table, and click on Done button.
5. Click on the Multiplication symbol, and click again on the Add Field button.
6. Select or click on the box that you want to add on the calculation table, and click on Done button.
7. Select the Input Table on the Summary option.
8. This time, select or click on the circle under the Total Column, and click on Save button.
Repeat the steps for all the numbers/rows in the Input Table.
To get the total, check out the steps below:
A. Use the Update/Calculate Field condition. In the Update/Calculate Field condition, click on Add Field button. And select the Input Table field.
B. Select or click on all the boxes that you want to add on the calculation table, and click on Done button.
C. Add the Addition symbol in between the selected/clicked boxes.
D. In the Summary option, select the Number field.
E. Click on Save button.Check out the results in the screencast below:
You can check out the cloned form here. If you want to check the cloned form, you can clone it. Here is a guide on how to clone a form.
Give it a try and let us know how it goes.