• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 543
  • Last Modified:

Disable Edit Mode

I have a form where there is a Submit button and a field that I use as a flag to record whether the form is already submitted or not. Right now, if the flag = "Y", the users can't submit the form again. What I would like to know is how can I stop the users to edit the form once the Submit button is clicked.

Thanks in advance
  • 2
1 Solution
For the Notes client, put code in the form's PostOpen and QueryModeChange events to enforce your conditions.  Here's an example...

If (Source.Document.GetItemValue("flag")(0) = "Y") Then Source.EditMode = False

Open in new window

If (Source.Document.GetItemValue("flag")(0) = "Y") Then Continue = False

Open in new window

The above method only secures the frontend method of access.

There are several ways to limit users a lot harder, so that even if they are really crafty and somehow write an agent, they cannot modify the data.
- use Reader and Author access limit the users capability, on submit, remove the user from the Author field, leaving only people access or a group or role in an Author field capable of modifying the form
- use the ACL to limit their access to Depositor
- use the button to mail the form to a database for which they only have Reader access

See the Designer help for Using an Authors field to restrict who can edit specific documents
You can also change underlying form once original form was submitted

when submitted you change the form where all fields are for display only
you can store form in the document, so it would be more of a picture of a form
@coronoahcoro: status update?

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now