How to create a "Save as Draft" function in a form


#1

You can add a Save as Draft function to a form, which gives the user the ability to save information already entered so that they can complete and submit the form later.

To demonstrate this function, we’ll use a default Simple approval process.

  1. In the Form Designer, click the gear icon in the toolbar to open the Form configuration panel.

  2. In the Buttons section on the General tab, check Enable save-as-draft. You can also customize the button label in the Save-as-draft label field.

  3. In the Workflow Designer, create a loop on the action to which you want to add the Save as Draft function.

  4. A process data will already be in place to store the value of the Save as Draft flag. Use this data in the loop condition to determine when the Save as Draft function is used.

  5. Define a condition for the transition to the next action (VALIDATES in our example).

  6. When the Save as Draft function is enabled, the button is displayed for all of the actions in the workflow. However, if you want to display the button only for certain actions, you can add .NET code to the form. The following code example will add the button to the INITIATES action only:

    protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
        
            if (this.CurrentWorkflowActionName != "INITIATES")
            {
                saveAsDraftButton.Visible=false;
            }
        
        }
    

The user will now be able to save their request. To continue or complete the request, they can retrieve it from the My actions to do section in their User Portal, launch the action (INITIATES in our example), and submit the form once it’s complete, or save it again then complete it and submit it later.


#2

I’m getting lost on this step. I’ve enabled the Save as Draft button and have routed the appropriate action to itself but I’m not sure what condition I’m supposed to use. What data is this step talking about?


#3

Hi Andre,

The data is FORM_DRAFT.
If the Submit as Draft button is clicked FORM_DRAFT="Y", otherwise it would be equal to “N” by default.

Regards,
Eddy.