One-time form submission.

One-time form submission.

  
How to allow the user to submit a form once and only once?
(once the form has been submitted, the user
-shall not be able to resubmit the same form again or click the submit button multiple times
-shall not be able to click the browser back button to view the form again ----
-System presents form1 on screen
-User fills in form1
-User clicks submit button
-System records data in database and redirects to "status" page etc..
----
You could place a query in preparation screen to see if the user already submitted a form, if he did, he would be redirect or whatever you want to do.
Easiest way would be to ..
-create a variable "SubmitForm" with data type boolean, this variable checks to see if the form has already been submitted.
-Set "SubmitForm" to False when the form is first loaded
-Set "SubmitForm" to True in a "Submit" action when the submit button is clicked
-In the "Submit" action you would also check if the form has already been submitted or not
ie check SubmitForm, False means form has not been submitted, True means form has already been submitted.


As for clearing the user's input values, you could copy the user's input values that you need to use into another variable
then use "assign" function to set the widget input fields to blank values.

(I guess ive answered my own question).