Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
This JavaScript example is relevant to Forms only. Let's say you have a new customer registration Form A that is normally forwarded to Forms B and C to complete registration for a new user. Returning Users skip Form B and go directly to form C.
This JavaScript example will automatically submit a form if a certain control has some specific value (say “not-new”) in it when the form is loaded. This might be useful in cases where a form needs to be submitted to post the data in it, but interaction between the form and user is not necessary. If the user's input is not required, this custom JavaScript can submit the form automatically.
Tip |
---|
Instead of using JavaScript, the same thing can be accomplished with a workflow with a precondition that skips a step or a templatized value of a control to decide where the user should be forwarded using Business Rules. This is the recommended approach and should be considered. |
...
Flow steps only allow for one email document action Activity Document Action (ADA), but there are cases where you may want to configure a second email to send ADA (such as a second email) from the same flow step. If the step is at the end of the flow, you can use Flow Doc Actions to accomplish this task. For steps in the middle of a flow, create an additional linked step, set up the second email document action ADA on the added step, and then use a script to automatically submit that step so the users will not see it. The script is similar to that for Auto-Submit a Form, but one key difference is that you will need a rule on the form that sets your conditional-submit control to the value specified in the script ("next" in the example below) on the step that should auto-submit, and then use the else action to set that control to empty on all other steps. Add conditional-submit to the CSS Class property of the control whose value is to be compared.
...
This JavaScript example will submit the form when the user presses the Enter key. If you want to do this in a flow, change SubmitView.doSubmit("Submit"); to FlowView.getFlowButton().onclick();
...