Make Calculation Value Read Only

  • Ruth Leighton
    Asked on September 22, 2021 at 8:56 AM

    Hello, Can I make the results view only? so the form viewer can not alter the result?

  • Jovanne JotForm Support
    Replied on September 22, 2021 at 4:18 PM

    Hi, thank you for contacting support.

    Can you please share with us the form link so we can check?

    Also, if you don't want your users to alter the result of a calculation, you need to add this CSS property to that specific field:

    pointer-events: none;

    After adding this code to that specific field, the users cannot be able to manipulate them manually.

    Please give it a try and let us know if you need further assistance.

    Thank you.

  • Rleighton
    Replied on September 23, 2021 at 4:33 AM

    Thank you for your email.

    The form in question is https://eu.jotform.com/build/212641621581046

    Apologies, I tried to add the CSS code onto the form but failed

    Would you be able to have a look?

    Kind Regards

    Ruth

  • egemen
    Replied on September 23, 2021 at 8:47 AM

    Hello @Rleighton,

    I prepared an alternative solution using another field and conditions. Can you try this and let us know if it satisfies your requirement?

    1. Add a new number field just below your Form Calculation widget. Rename your existing calculation field and put something like “HIDDEN CALCULATION” so we can easily recognize it.1632401190 614c7726696b8 Screen Shot 202 Screenshot 10
    2. Open Properties, ADVANCED tab of your calculation and activate “Hide Field”.1632401200 614c773002c52 Screen Shot 202 Screenshot 21
    3. Open Properties, ADVANCED tab of the new number field we added and activate “Read-only”.1632401221 614c774507dc4 Screen Shot 202 Screenshot 32
    4. Go to SETTINGS tab on your form, select CONDITIONS on the left menu and create a new UPDATE/CALCULATE FIELD condition.1632401231 614c774f0ef1c Screen Shot 202 Screenshot 43
    5. Set up your condition as shown in the screenshot below. If calculation is filled (which means it has a valid amount inside) then copy the field value from calculation widget to the new number field we added. This way, the value calculated inside the widget will be immediately shown in the number field, and the number field is not editable by the user.1632401239 614c77577afef Screen Shot 202 Screenshot 54

    Would you also want me to open a feature request regarding Read-only option for Form Calculation widget?