After Process Behavior
- HST Behavior class: com.onehippo.cms7.eforms.hst.behaviors.AfterProcessBehavior
- HST Component class: com.onehippo.cms7.eforms.hst.components.AfterProcessComponent
- CMS Plugin class: com.onehippo.cms7.eforms.cms.extensions.AfterProcessPlugin
Introduction
The After Process pluggable behaviour contains information relevant to after the form has finished processing. It has the following fields:
Field | Description |
---|---|
Confirmation | Radio buttons to choose the behavior after the form submission. |
Confirmation text | Optional text to be presented as confirmation text in the page.
It will be set as request attribute 'afterProcessSuccessText'. |
Confirmation URL | Optional URL to be redirected to after the form submission.
It should either start with 'http' for an external redirect or be an existing HST sitemap path. |
Screenshot:
CMS Configuration
To add the CMS plugin to the form editor, add a node of type frontend:plugin under /hippo:namespaces/your_namespace/your_form/editor:templates/_default_. Add the following properties:
- plugin.class = com.onehippo.cms7.eforms.cms.extensions.AfterProcessPlugin
- mode = ${mode}
- wicket.id = ${cluster.id}.extensions.item
- wicket.model = ${wicket.model}
HST Configuration
Behavior configuration
To add the behavior to your form component, add the following parameter to the component configuration:
- behaviors parameter: com.onehippo.cms7.eforms.hst.behaviors.AfterProcessBehavior
Component configuration
The form component should be extended from com.onehippo.cms7.eforms.hst.components.AfterProcessComponent. It sets the attribute processDone to either true or false dependding the process is successful or failed.
Demo
The Enterprise Forms demo contains a form that has the After Process behavior plugged in.
- CMS: http://localhost:8080/cms/?1&path=/content/documents/hippoaddoneformsdemo/forms/after-process-form
- Site: http://localhost:8080/site/afterprocessform