Plugin Forms | |
Authors | Anyware Services |
Most recent version | 1.3.0 |
Tracking issues | |
Download | Lastest version |
This extension allows you to create forms for yours visitors. The forms are very simply to create in a rich text and can be submitted to existing external applications or handled directly in the cms application.
Features :
- powerful assistants to create forms in your content
- add validation (mandatory, number min and max, regexp, ...) on form fields
- alert emails address for each form to be notify on each submission
- acknowledgment mail for each form to send to visitor after submission
- export in .csv format of the entries
Forms 1.0.x requires jquery-ui 1.8.5, jquery 1.4.2.
Forms 1.1.x requires jquery-ui 1.8.7, jquery 1.4.4.
Add the plugin JAR in the WEB-INF/lib directory of your Ametys application
Add this declaration to you file WEB-INF/param/cms-ribbon.xml. This declaration add a "Insert form" menu, so it is a good idea to add it in the insert section of the inline editor toolbar (near org.ametys.cms.edition.table.Insert for example)
<control id="org.ametys.plugins.forms.Insert"/>
Add this declaration to you file WEB-INF/param/cms-ribbon.xml. This declaration add a "Export forms" button, so it is a good idea to add it in content toolbar (near org.ametys.cms.ContentConsistencyTest for example)
<control id="org.ametys.forms.ExportForm"/>
At the end of the same file (but before the closing tag), add the following declaration (that will add all the forms tabs)
<!-- Forms --> <import>plugin:forms://cms-ribbon.xml</import>
Finally, add this to the workflow (default workflow is at WEB-INF/param/workflow.xml).
<post-functions> <function type="avalon"> <arg name="role">org.ametys.plugins.forms.workflow.FormEditionFunction</arg> </function> </post-functions>
This post function must be added to the edit action. In the default workflow, find the common action 2 (which name is EDIT - <common-actions><action id="2"...) and add the snippet juste after the <results> tags
This should looks like
<action id="2" name="plugin.web:WORKFLOW_ACTION_EDIT"> <restrict-to> <conditions type="AND"> <condition type="avalon"> <arg name="role">org.ametys.web.workflow.ContentCheckRightsCondition</arg> <arg name="right">Workflow_Rights_Edition_Online</arg> </condition> <condition type="avalon"> <arg name="role">org.ametys.cms.workflow.LockCondition</arg> </condition> </conditions> </restrict-to> <pre-functions> <function type="avalon"> <arg name="role">org.ametys.cms.workflow.EditContentFunction</arg> </function> </pre-functions> <results> <unconditional-result old-status=" " status=" " step="1" /> </results> <post-functions> <function type="avalon"> <arg name="role">org.ametys.plugins.forms.workflow.FormEditionFunction</arg> </function> </post-functions> </action>
Restart your servlet engine.
You have to add the new rights to your profile before you can see the news features.
Your data are stored in your SQL database.
There is a table for each form which name is prefixed with "PluginForms-".
The exact table name and the columns name are ids.
When the contributor erase a field, the column is kept but not used anymore (you can still get the data)
When a form is removed (or its content), the whole table is kept.
There are currently no way to know :