Form Calculation Widget: How to get the square of a number

  • AJ Moolman
    Asked on November 26, 2024 at 3:50 AM

    How do I calculate a number Squared using the functions in a Widget?

    I'm using the Medical Questionnaire Template, but adding Weight and Height number fields, plus then giving feedback based on these two parameters on the BMI, which needs to be calculated by BMI = weight (kg) / [height (m)]2

    Please advise or assist

    Thank you

  • Eldrex_B
    Replied on November 26, 2024 at 9:23 AM

    Hello AJ,

    Thanks for reaching out to Jotform Support. You may use our Form Calculation Widget and calculate the number BMI based on the given information by the field user. The formula should be weight (kg) / (height(m) x height(m). This means that the height should be multiplied to itself to get the square results. This formula should be followed and entered in our Form Calculation Widget. Here's how:

    1. In Form builder, click Add Element.
    2. Go to Widgets and Search for Form Calculation.
    3. Drag the widget to your form and name it BMI. Form Calculation Widget: How to get the square of a number Image 1 Screenshot 40
    4. Now follow this formula:Form Calculation Widget: How to get the square of a number Image 2 Screenshot 51

    Here's the result:

    Form Calculation Widget: How to get the square of a number Image 3 Screenshot 62

    Give it a try and let us know how it goes.