How to prevent manual input in a field that is a form calculation widget?

  • Profile Image
    Beanie3556
    Asked on March 15, 2017 at 02:50 AM

    Dear Forum and Support at Jotform.

    I have a form where the user selects start and end time.

    The total time is then calculated using the form calculation widget.

    Please see the form below:

    https://form.jotform.me/70722116456452

    I noticed that after selecting start and end time, the user can actually manually enter any digit or letter in the fields.

    In normal text entry field, using properties, it is possible to prevent manual input of data.

    When looking in the properties for the form calculation widget, there is no such options.

    When looking in settings/.../options for the form calculation widget, there is an option to check "result field is read-only", if I check this box, then there will be no calculation performed.

    I want the calculation to be performed as intended, but I want to prevent manual input by the user.

    Anyone who knows how to achieve this?

    Thank you very much in advance for your great support.


    Best Regards,

    Bjorn

  • Profile Image
    Nik_C
    Answered on March 15, 2017 at 04:43 AM

    You can add the below CSS to your Custom CSS field to make the field read-only:

    div#cid_132{

    pointer-events:none;

    }

    div#cid_133{

    pointer-events:none;

    }

    It will make both of your Calculation fields read-only. 

    Hope it helps. 

    If you have any further questions please let us know.

    Thank you!