prevent fields from editing submission

  • rtolmach
    Asked on February 24, 2021 at 3:30 AM

    Hello Jotform


    We provide the Edit link so the submitter can come back and edit their submission.

    However, there are two fields we do not want them to be able to edit after their initial submission.

    I know we can use the widget to tell us the URL of the page where the form appears, and we can base conditional logic on whether that URL contains "edit."

    I know that we can make a text field Read-only, but I do not know how to make it read-only if they are in edit mode.

    The only thing I can think of is to have, for instance, the following:

    Let's call the fields that we do not want them to edit Field B and Field C.

    Create two fields, which we will call Field D and Field E.

    Field D shows the value from field A. (I think I saw that we can do that, but I do not recall how. Please remind me).

    Likewise, field E shows the value from field B.

    If the web page where the form appears DOES NOT HAVE "edit" in the URL, then hide fields D and E are hidden.

    If the web page where the form appears DOES HAVE "edit" in the URL, then hide fields B and C.

    Is that the way you would do it? If so, please remind me how to make fields D and E show the value of fields B and C.


    Thank you!

    Robert

  • Richie JotForm Support
    Replied on February 24, 2021 at 7:40 AM

    You may use conditions to either hide the fields or set it to read-only once the form is edited.

    To setup this up:

    1)add a get form Page URL widget . This widget will let the condition know that the form is edited.

    https://www.jotform.com/widgets/get-form-page-url

    2)Use condition to hide or set the field to be required once the form is edited.

    1614170392 6036491872c5c 1 Screenshot 10

    Please check it out and let us know how it goes.

  • rtolmach
    Replied on February 24, 2021 at 8:33 PM
    Hello JF

    I understand that.
    You did not say, is there a way that I can use conditions (URL contains “edit”) to prevent a field from being edited?

    Thanks
    Robert


    ...
  • Richie JotForm Support
    Replied on February 25, 2021 at 2:47 AM

    Hi Robert,

    To disable a field, you may use the enable/required field condition, you can check this screenshot:

    1614239175 603755c7db83c 1 Screenshot 10

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

  • rtolmach
    Replied on February 25, 2021 at 3:06 AM

    Thanks, but neither your note nor this article I found

    https://www.jotform.com/help/371-how-to-enable-disable-fields-using-conditional-logic

    says what "Disable" means.

    Does it mean that the person can see the field (and if they are editing, they can see the prior value), but that they cannot enter or edit info?

    I experimented with a sandbox form, and that seems to be the case. You might suggest they clarify that in the article.



  • Richie JotForm Support
    Replied on February 25, 2021 at 4:18 AM

    You are correct, the user can see the field but they cannot input any values to the fields.

    Thank you for your feedback.

    If you need further assistance, let us know.

  • rtolmach
    Replied on February 25, 2021 at 4:28 AM

    Thanks. All done on this ticket. I have some other tickets open, which I actually submitted before this.