You can configure an adaptive form to automatically start saving the content based on an event or a pre-defined time-interval. By default, contents of an adaptive form are saved on a user action, such as on pressing the save button. The auto save option is helpful in:

  • Automatically saving the content for anonymous and logged-in users
  • Saving the content of a form without or minimal user intervention
  • Start saving content of a form based on a user event
  • Saving the content of a form repeatedly after a specified time interval

Enable autosave for an adaptive form

For an adaptive form, the auto save option is not enabled out of the box. You can enable the auto save option from the Auto Save tab of an adaptive form. The Auto Save tab also provides several other configuration options. Perform the following steps to enable and configure the auto save option for an adaptive form:

  1. In the Start an Adaptive form panel, click Edit. The Edit Component dialog box appears.

  2. In the Auto Save tab, enable the Enable Auto Save option.

  3. In the Auto Save Start Expression box, provide an expression. The adaptive form starts saving the content of the form, when the expression evaluates to TRUE.

    Note:

    You can specify 1 or TRUE to automatically start saving the form when the form is loaded in the browser.

  4. In the Auto Save Strategy box, select appropriate strategy. Out of the box, the following strategies are available:

    • Forms Portal Time Based Auto Save: Select the option to start saving the content based on a specific time interval.
    • Forms Portal Event Based Auto Save: Select the option to start saving the content based when an event is triggered.

    You can also create and add your own custom strategy to the list. For details, see Implement a custom strategy to autosave the forms.

  5. (Time-based autosave only) Perform the following steps to configure options for the Time-based autosave.

    1. In the Auto save on this interval box, specify the time interval in seconds. The form is saved repeatedly after the number of seconds specified in the interval box elapse.
    2.  (Optional) You can save extra metadata along with the content of the form. To specify fields in the AdditionalMetadata section, click Add Item, specify the fields, and corresponding attributes.

    Note:

    The additional metadata is saved in separate CRX nodes. These nodes are created at /content/forms/fp/admin/drafts/metadata/. Every node is a unique identifier. A new node is created every time a new instance of a form is created.

  6. (Event-based auto save only) Perform the following steps to configure options for Event-based auto save.

    1. In the Auto save on this event box, specify a GuideBridge event. The form is saved every time the expression evaluates to TRUE.
    2. (Optional) You can save extra metadata along with the content of the form. To specify fields in the Additional Metadata section, click Add Item, specify the fields, and corresponding attributes.

    Note:

    The additional metadata is saved in separate CRX nodes. These nodes are created at /content/forms/fp/admin/drafts/metadata/. Every node is a unique identifier. A new node is created every time a new instance of the form is created.

  7. (Optional) To automatically save the content for anonymous users, select the Enable Autosave for anonymous users option, and click OK.

Implement a custom strategy to enable autosave for adaptive forms

You can implement a custom event to trigger the autosave functionality. Perform the following steps to create and implement the custom event:

  1. Create client library and client library folders. For detailed steps, see the Using Client-Side Libraries document.

    For example, the following script uses the custom emailFocusChange event to trigger the autosave functionality:  

    window.addEventListener("bridgeInitializeStart", function (){   
        guideBridge.connect(function () { guideBridge.on("elementFocusChanged", function (event,data) { 
            if(data.target.name === 'Email') {
                guideBridge.trigger("emailFocusChange");
            }
        });
       });
    });
    

    Note:

    A category property is defined while creating the client library folders. Keep the value assigned to category property handy.  

  2. Open the adaptive form in author mode.

  3. On the start of an Adaptive form panel, click Edit. The edit dialog box appears.

  4. Open the Styling tab. In the Name of the client library box, enter the value of the category property defined while creating the client library folders.

  5. Open the Auto Save tab. In the Auto save after this event box, specify a custom event already defined in the client library. Click OK.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy