I have created a workflow associated with InfoPath form. When user fills the form and clicks on Submit . Workflow will kick off and sends an email to user and other groups in email chain, but when ever user is clicking submit twice it is sending two emails. How should I restrict user once submitted the application not to click on submit and not to send second email? I am using InfoPath 2010 and Workflow is form designer.
You may add a field either in InfoPath or on the SharePoint List. If you are going to add the field in InfoPath, make sure you just use it in the rules like a hidden field concept.
In your rules, update this field to 'YES' on click of the submit button. Then in your workflow, check for this flag field and add a conditional check to trigger your workflow. This should help resolve your issue.
Also, primarily the double-click on the submit button could be more of a browser issue and i have noticed this as well, when you usually have validations or so on your InfoPath form. Sadly, it is the behavior we have to deal with.
If the User is double clicking the Submit button, I'm not 100% positive this will work, but if they are clicking Submit, then reopening the form and clicking Submit again, the following will work:
- Create a checkbox field called "formSubmitted" (default to no value)
- Add a rule so that when the User clicks the Submit button, set the formSubmitted field to checked (Probably want this to be the first rule that runs)
- Add a conditional formatting rule to the Submit button that when the formSubmitted field has a value, disable the control (you can also gray out the button as part of this rule).
i haven't tried form designer, but in SP designer you can tell the workflow when you want it to be fired, when the item is created, when the item is modified and when the item is submitted.
I might be biased, but i would recommend you to switch to SP Designer workflow
on Sp-Designer open your workflow, and on the properties check "star workflow when item is created" and uncheck when item is modified
if you still need to run some part of the workflow when the item is modified, i would move that functionality to a different workflow that start only when the item is modified.