Make Calculation Value Read Only

  • Profile Image
    Ruth Leighton
    Asked on September 22, 2021 at 08:56 AM

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



    This is a re-post of a comment on How to Assign Calculation Value

  • Profile Image
    Jovanne
    Answered on September 22, 2021 at 04: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.

  • Profile Image
    Rleighton
    Answered on September 23, 2021 at 04: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

  • Profile Image
    egemen
    Answered on September 23, 2021 at 08: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
    2. Open Properties, ADVANCED tab of your calculation and activate “Hide Field”.1632401200_614c773002c52_Screen Shot 202
    3. Open Properties, ADVANCED tab of the new number field we added and activate “Read-only”.1632401221_614c774507dc4_Screen Shot 202
    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
    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

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