OnClose and OnComplete are fields found in the module settings for selected modules under the Developer section. To access this section, select a module that you have added to your page followed by the Settings palette.
What is OnClose?
This type of command will run when the module is closed down by the user:
- closing the pop-up (by selecting the cross from the top right corner)
- completing a task that closes the pop-up (for example - a quiz).
What is OnComplete?
This type of command is similar, however, it will only run after the module has completed its task, not if it is closed before (for example - viewing an in-page video).
You may have a pop-up video, which contains key information that your readers must know.
If the video is closed before it has finished playing, a More Information Popup could be triggered to warn the reader that the content of the video is important and they must watch it.
- Add a More Information Popup module off-page, select Settings and copy the JS Command
- Select your video module, select Settings and paste the JS Command into the OnClose field
- The More Information Popup will be triggered when the video is closed.
On completion of the video (i.e. the video has played to the end), a survey module could be triggered to collect feedback.
- Add a survey module off-page, select Settings and copy the JS Command
- Select your video module, select Settings and paste the JS Command into the OnComplete field
- The survey will be triggered when the video is complete.
Modules that support these fields are: