Hello, I am a beginner in Bubble.
As a test, I am trying to create a simple calculator to find the volume of an object.
The user inputs the width, height, and depth, then selects a length unit from a dropdown menu to calculate the result.
For example:
-
m → multiply by 0.001
-
cm → multiply by 0.01
Currently, I am working with JavaScript along with the Toolbox plugin.
Here is my issue: I need to convert the selected length unit into a number for the final calculation, but even when I store the dropdown value in a variable, I can’t verify it.
Sometimes, I get a "value" is not defined
error.
How can I store the selected value from the dropdown into a variable?
Also, how can I convert the text in the dropdown into a number and include it in the calculation?
(I’ve changed the variable names for the screenshot, it is not related to duplicate variables!)