Download jars from plugin and add them (ametys-plugin-forms-1.9.0.jar and ametys-plugin-forms-resources-1.9.0.jar) to your application's WEB-INF/lib directory. Ametys
Add button to view form data in file WEB-INF/params/cms-ribbon-default.xml. The menu identifier is org.ametys.forms.ShowFormEntries. Add button to contextual content tab org.ametys.cms.content.Tab
In the same file, to be able to create a form in the content editor, also add the button org.ametys.plugins.forms.Insert in the org.ametys.cms.content.EditionTab
In the same file, adding the button displays all the forms present in the site contents, in the Home tab. The button identifier is org.ametys.plugins.forms.FormsList
In this same file, import the ribbon file specific to forms cocoon://plugins/forms/ribbon.xml
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Please note! If the group contains a description , and , the button must be added to the 3.
In the content workflow file WEB-INF/param/workflow.xmladd a post-function org.ametys.plugins.forms.workflow.FormEditionFunction to process the forms present in the content at the time of saving. To do this, copy the following code XML and copy it at the end of the editing action with identifier n°2, just after the tag <results>
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Workflow names specific to form entries must begin with "form-".
4) Define your workflow label
In translation files WEB-INF/i18n/application*.xmlAdd a line to define the name of your workflow. The key is "WORKFLOW_" followed by the workflow name, i.e. WORLFLOW_form-default
Oops!
Copy to clipboard failed. Open the code and copy it manually.
The workflow is ready! You can restart the server and use it in your forms
Step 2: customize standard workflow (optional)
You can customize the standard workflow by adding/removing workflow actions/states.
Workflow settings are identical to the other workflows in the application. Go to the Workflow settings page to find out more.
If you are adding a report, you will need to add to the plugin.xml the declaration of the button representing this state.
This button must be defined as shown below:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<extension id="form-wokflow-button.form-default.[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
<extension id="form-wokflow-button.form-default.[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
<extension id="form-wokflow-button.form-default.[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
The button identifier must be composed of "form-wokflow-button." followed by the workflow name, followed by ".", followed by theworkflow state identifier.
Don't forget to add the i18n keys and icons associated with your new reports.
Step 3: Add a new workflow (optional)
Each time you add a new workflow, follow these steps:
Create a workflow description file in the WEB-INF/param of your application. Go to the Workflow settings to find out more.
Name and reference your workflow in the WEB-INF/param/workflows.xml
The workflow name must begin with "form- "(e.g. form-monworkflow).
Define the worflow label in the WEB-INF/i18n/application*xml The key must be "WORKFLOW_" followed by the workflow name. (e.g. WORKFLOW_form-monworkflow)
Copy/paste the following extension declaration into a file plugin.xmlreplace "form-default" with the name of your workflow
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Define a workflow button for each workflow state, based on the following model:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<extension id="form-wokflow-button.[nom_workflow].[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
<extension id="form-wokflow-button.[nom_workflow].[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
<extension id="form-wokflow-button.[nom_workflow].[id_etat]"
point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
class="org.ametys.plugins.forms.workflow.FormEntriesWorkflowMenu">
<workflow name="form-default">
<step>[id_etat]</step>
<actions mode="include">
<!-- Liste des actions disponibles depuis cet état -->
<action>[id_action]</action>
<action>[id_action]</action>
</actions>
<!-- Activiter ou désactiver les commentaires -->
<comments mode="include"/>
<workflow>
</extension>
The button identifier must be composed of "form-wokflow-button." followed by the workflow name, followed by ".", followed by theworkflow state identifier.