Categories
Advanced Web Components

Web Component – Add multiple fields and sum them in one field (SumFields.Vue)

The SumFields.Vue component adds values from up to ten fields and presents the total sum of them in the text field ‘setfield’ (which in the example below is named “sum”)

<sum-fields field1="sum1_checkbox" field2="sum2_radiobutton" setfield="sum"></sum-fields>

Value is filled in the example above with the price (without SEK) and will be added to the values of the other selected fields and finally summed in the field “sum”.

It is possible to use a mix of field types (eg. Checkbox field and Radio button field) to summarize.

Should you as a customer need to be able to add more fields than ten, please contact Lime Gävle and we will help you with the configuration of this.

Example:

https://janjoo.simpliform.se/forms/rjsr3vB9pAa2AHsnnwR6

Other web components that are available for your forms are: