Du får vist hjælpeindhold for version:
- 6.4
- 6.3
- 6.2
- Ældre versioner
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
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 section in the properties of an adaptive form. The Auto Save section also provides several other configuration options. Perform the following steps to enable and configure the auto save option for an adaptive form:
-
Specify the Trigger. Auto-save is triggered based on your configuration. Your options are:
- Time based: Select the option to start saving the content based on a specific time interval.
- Event based: Select the option to start saving the content based when an event is triggered.
When you select a trigger, Strategy Configuration box is enabled. Strategy Configuration box lets you:
- Specify a time interval if you select Time based trigger.
- Specify an event name if you select Event based trigger.
You can also create and add your own custom strategy to the list. For details, see Implement a custom strategy to autosave the forms.
- Time based: Select the option to start saving the content based on a specific time interval.
-
(Event-based auto save only) Perform the following steps to configure options for Event-based auto save.
- In the Auto save after this event box, specify a GuideBridge event. The form is saved every time the expression evaluates to TRUE.
-
(Optional) To automatically save the content for anonymous users, select the Enable Autosave for anonymous users option, and click OK.
Bemærk:
For auto save option to work for anonymous users, ensure that you configure the Forms Common Configuration Service to allow all users to preview, verify, and sign forms.
To configure the service, go to AEM Web Console configuration at http://[server]:[host]/system/console/configMgr and edit the Forms Common Configuration Service to choose the All Users option in the Allow field, and save the configuration.
You can implement a custom event to trigger the autosave functionality. Perform the following steps to create and implement the custom event:
-
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"); } }); }); });
Bemærk:
A category property is defined while creating the client library folders. Keep the value assigned to category property handy.