I have to pull some data from a formula into a popup after the customer pushes the “book” button.
I have set a state called “booking_final_price” on a text field where I have this simple formula which multiplies the number in the dropdown (hours) with the price per hour. Note: Calculation is correct, no problem there.
Here is the element state of that (text)formula field set as it’s currently setup on the initial page where the formula exists.
Did you set the custom state value to that exact formula?
However you don’t need to create a custom state, you could just use an input to calculate the formula and reference that input’s value into your popup.
In regards to the custom state, I just clicked the “i” icon in that calculated text field and set it to “booking_final_price”.
For a direct approach, I tried calling that text field by name directly in the popup up but I don’t have a “'s value option”. I only have width and height. This Total Amount Booking sits in a text field (value is correct over there after the calc)
I’m attaching a picture
You’ve created the custom state but did not assign a value to it. Assigning a value is done through workflow, using the Set state of an element action. When the button “book” is clicked add Set state of an element as workflow action. The custom state value should be your formula Dropdown Hours’s value * Current pages’s CoworkingSpace’s space-price.
Texts don’t have values. Texts are just texts. For this reason, to avoid having to set up a custom state for your text element, you could use an input for Total Amount Booking and calculate your formula there.
In your popup insert that input’s value into the Text Total price element.