FormitFastPack
Created by Jay Gilmore on Mar 21, 2014. Last edited by Oleg Pryadko on Sep 14, 2014.
What is FormitFastPack?
FFP simplifies the management of HTML associated with form-processing snippets like FormIt and Login.
Installation
Install from the MODX package manager.
Included Snippets
field: One snippet call generates the HTML for a single form field. The HTML for all fields of a single design can be managed with only two chunks (one outer and one inner), and dynamic values such as the current field value and error messages are processed correctly. Selective caching speeds up option processing.
fieldSetDefaults: This snippet outputs nothing, but any parameters passed to it will change the default value for all subsequently-processed field snippets. This method of setting defaults will not work if a property set is used with the field snippet.
fieldPropSetExample: This is a dummy snippet that holds a complete property set for the "field" snippet. Because property sets cannot work with fieldSetDefaults, the field snippet does not come with a property set. This property set is provided for those who prefer to use property sets over fieldSetDefaults.
fiGenerateReport: A FormIt hook which generates an email report by iterating all field submitted names and values through a row template chunk.
fiProcessArrays: A FormIt hook which transforms array values into concatenated strings. Later versions of FormIt now provide similar functionality.
formCollectErrors (coming soon): Outputs a list of form errors.
Automatic Labels
By naming your fields properly, you can use FFP's method of generating labels from field names. Alternatively, you can manually specify labels.
The labels are generated using simple output filters that can be customized:
[[+name:replace=`_== `:ucwords]]
Field Name | Generated Label |
name | Name |
first_name | First Name |
company_address | Company Address |
number_of_employees | Number Of Employees |
Support
- Submit issues, questions, and feature requests to the Issue Tracker.
- Track development on GitHub
- Discuss on MODX Forum
- Contact the author at websitezen.com/contact.
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).