V
V
Vladislav Tikhonov2020-10-11 16:47:49
CMS
Vladislav Tikhonov, 2020-10-11 16:47:49

How to set a value dependency on a checkbox in Tilda?

Hello. There is such a form on Tilda, there are several parameters, width, height, depth of the cabinet, shelves, etc. And there are no problems with them, I stuffed them into the general formula, but how to stuff checkboxes?

Conventionally, I count separately the amounts for the floor, roof, left and right wall. And I need to make it so that when the checkpoint is active, this or that value is multiplied by zero.

Let's say you clicked "Without gender" and the cost of the floor multiplied by zero, thereby removed. Of course, maybe I'm stupid, but I can't fucking find a solution.

5f830c7e2b77c302944059.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shnitz, 2021-01-08
@shnitz

Good afternoon!
1. In the form inputs for each checkbox in the Label field, you must set the value = 1, for example: No gender =
1 it will work too 2. Set the variable names for the checkboxes, for example woutfloor, woutrightwall, etc. 3. In the formula, it is necessary to reduce to zero the part that needs to be excluded, for example: summfloor*(1-woutfloor) + summrightwall*(1-woutrightwall) , etc. In short, by subtracting the value of the checkbox from one, you get the very coveted zero, which resets the unnecessary part of the total cost to zero.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question