Question:
I want to use the information given by the user through the form to calculate a value. How Do I proceed?
Product:
I am using Wix Studioe
What are you trying to achieve:
The form basically takes users’ height, weight, age and activity level to determine their daily calorie intake for fat loss.
What have you already tried:
I tried using automations but I keep getting errors. ( It doesn’t show which error it is)
Hi, If you want to run the calculation while the user is filling out the form (before submission), you can try using onFieldValueChange(). Alternatively, if you want to perform the calculation after the form has been submitted, then using onSubmit() would be the way to go.
If you’re using Velo (SDK) , you’ll need to write the code in the page code section of the page where the form element is placed. If you’re new to Velo, this link should give you a good understanding of the basics. I’ve also included links to the APIs that seem relevant to the functionality you need.