Disable Field: How can I disable field in edit mode?

  • FacilityForms
    Asked on January 25, 2021 at 4:58 PM

    I want to lock the "employee name" field once the field has been submitted for that "Year"

    The goal is to only have one submission per name per year and to only be able to edit changes to that submission, not change the name.

    Right now, the employee name can be changed in the edit mode by another person, so I lose that history.

    Sidenote: I have position disabled but it shows back up in edit mode.

    1611609251 600f34a3dc8c8  Screenshot 10

  • FacilityForms
    Replied on January 25, 2021 at 5:31 PM

    I think I found a work around by add a new name field and by coping and hiding the employee name field once they start adding the email.

    I deleted the position field.

    Any feedback that may make this work better is still helpful.

  • Sigit JotForm Support
    Replied on January 25, 2021 at 9:22 PM

    Hi,

    Thank you for contacting support.

    I am glad that you've found a workaround to your need.

    Allow me some time to look for other options. Where we can disable the name field if the form url has "edit" on it.

    Thank you. Regards.

  • Sigit JotForm Support
    Replied on January 25, 2021 at 9:46 PM

    Hi,

    Other option would be

    #1 Add "Get Form Page URL" widget in the form where users submitted their data and hide the field.

    #2 Add condition in form to check if the widget contain text "edit" and then disabled the Employee name field. Please check the screenshot below:

    1611628845 600f812dd561d  Screenshot 10

    Now, when your users will edit the submission by clicking "Edit Submission", they will not be able to edit the Employee name field.

    Demo form: https://form.jotform.com/210248252973052

    Hope this helps. Please try it out and get back to us if you have any questions.

    Regards.

  • FacilityForms
    Replied on January 26, 2021 at 8:39 AM

    Wow! Simple when you know how. Most helpful.

    Thanks

  • FacilityForms
    Replied on January 26, 2021 at 9:49 AM

    I've added this just as shown, but it does not disable the fields.


    1611672551 60102be77bdb0  Screenshot 10

  • Zahra_S
    Replied on January 26, 2021 at 11:37 AM

    You have added the condition correctly. It should disable the fields in edit mode. Please note that the disabled field means that the user will not be able to edit the field, but he can still view it. It will not hide the field.

    Please share the form link so we can further investigate the issue on our end.

  • Cityplex
    Replied on January 26, 2021 at 2:04 PM

    But I can still view and edit the both fields, it's not working

  • Sigit JotForm Support
    Replied on January 26, 2021 at 8:07 PM

    Hi,

    Could you please confirm that this is the page url https://form.jotform.com/210205994815053?

    Please allow me some time to do some tests.

    Thank you. Regards.


  • Sigit JotForm Support
    Replied on January 26, 2021 at 9:16 PM

    Hi,

    Thank you for your patience.

    Could you please try placing the Get Page URL conditional logic in the last position.

    1611713284 6010cb044d5d4  Screenshot 10

    Set the conditional logic for Get Page URL so that it disabled the 5. Name and 3. Year fields

    1611713541 6010cc0555e06  Screenshot 21

    Demo form https://form.jotform.com/210257340386957

    Please give it a try, and let us know how it goes.

    Regards.

  • Cityplex
    Replied on January 27, 2021 at 9:07 AM

    Perfect! Thanks