Score:1

How to calculate a field in webform?

br flag

We recently implemented a site on the Drupal environment.

We make considerable use of the amazing Webform system. However, we encountered a need for which we did not see a solution in the existing elements in the Webform.

We need an element that can perform a simple calculation (+ - * /) between other numerical fields and\or pre-set numbers as we choose. So that the person filling out the form will see the result of the calculation while filling out the form. Something like entering a number and multiply by X number or another number field.

Is there a solution for that?

Score:2
si flag

you can use Computed twig field. In this example it calculates the result of 5 fields (a2 + b2 + c2 + d2 + f2) only if all the fields are complete

enter image description here

Score:2
us flag

You probably want to use a computed element. Check out this video.

Eldad Shalhevet avatar
br flag
not exactly, I'm looking for calculated fields that calculates while filling the form (check this exampl on a previos platform we have (ignore the hebrew text) https://Bezalel.formtitan.com/fte7849c141623666488760
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.