Information collector basics
This page is for website creators and administrators who build their first form for a public-sector site. It summarizes how the information collector works, with the settings that matter, and points to the full guides: Forms with the information collector and Collected information.
Contents
- How it works
- The shipped form classes
- Form types and their settings
- After sending
- A first form, step by step
How it works
- A content class has attributes marked Information collector in the class editor. Visitors fill those in; editors fill the other attributes (a title, an introduction).
- An editor creates an object of the class; its full view shows the form.
- The form posts to
content/actionwith the buttonActionCollectInformation; each collector attribute is checked by its datatype (required, valid e-mail ...). - On success one collection is stored, a mail may be sent, and the visitor sees a result page or is redirected.
- Staff with the
infocollector/readpolicy read and export the collections in Setup > Collected information (/infocollector/overview).
The shipped form classes
| Class | Identifier | Collector attributes |
|---|---|---|
| Feedback form | feedback_form | Sender name, Subject, Message (Text block), Email; plus Name, Description and a Recipient (Email) filled by editors |
| Poll | poll | an option list (ezoption) |
| Contact form | ng_contact_form | in the default package's demo content classes |
| Advanced feedback form | cjw_feedback_form | where the CJW extensions are installed |
Add your own class when you need other fields (Content classes for websites).
Form types and their settings
settings/collect.ini decides behavior per type; an object's type comes from a collection_type attribute, else
[InfoSettings] Type=form:
| Block | Key | Shipped | Meaning |
|---|---|---|---|
InfoSettings | TypeList[] | poll, form, feedback | known types |
EmailSettings | SendEmail, SendEmailList[poll] | enabled; disabled for polls | mail on submission |
DisplaySettings | Display, RedirectURL | result, / | result page or redirect |
CollectionSettings | CollectAnonymousData | enabled | visitors who are not signed in may send |
CollectionSettings | CollectionUserData, CollectionUserDataList[poll] | multiple; unique for polls | one answer per user for polls |
Change them in settings/override/collect.ini.append.php or per siteaccess, then clear the INI cache
(php bin/php/ezcache.php --clear-tag=ini).
After sending
| Setting | Effect | Use for |
|---|---|---|
Display=result | the type's result template shows the sent values | polls (results) |
Display=redirect with RedirectURL | the visitor goes to a page | forms: a "thank you" page that says what happens next and when |
A redirect also stops a reload from sending the form again.
A first form, step by step
- Create a folder "Contact" in the tree.
- Create new > Feedback form: name "Contact us", a description saying what happens with the message and how long it is kept, and the recipient mailbox of the team.
- Send for publishing; open it logged out; send a test message.
- Open Setup > Collected information: the form is listed with one collection.
- Check the mail arrived (test with the file transport first: Mail to receivers).
For every detail: Building a contact form, step by step.
Related pages
- Building forms
- Accessible forms
- Reading and exporting form submissions
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.