About Form Template Processor and Mailer
Template fields define web contact forms. Can send forms as emails with or without PHPMailer. Can save forms as pages. Allows custom rendering. Features working demo HTML5 form. Use on static page and/or on any page via overlay.
Category 1 | Development Tools Modules that have more to do with assisting development of a site rather than managing its content. |
---|---|
Category 2 | Markup Generation Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin). |
Category 3 | Email/WireMail Modules that work with email as well as modules that implement ProcessWire’s core WireMail type. |
Release State | Beta Close to stable, but users are advised to be cautious and test thoroughly.* |
Author | |
Module Version | 1.0.0 |
Class Name | FormTemplateProcessorMailer |
Compatibility | 2.3, 2.4 |
Date Added | July 16, 2013 |
Recommended By | New recommendations may take up to 1 day to appear. |
Details
A takeoff on Ryans FormTemplateProcessor POC
Instructions
This module's files should be placed in /site/modules/FormTemplateProcessorMailer/
How to install or uninstall modules
README
Overview:
=========
Creates and processes ProcessWire templates into HTML forms.
Can send email and/or save the submission to a page in your site.
Mail option via native mail() or with PHPMailer via mail() or SMTP.
Includes POC HTML5 contact form in a static page and via async modal/overlay.
For more information on Ryans original POC:
http://processwire.com/talk/index.php/topic,75.0.html
Designed and tested on pw 2.3.0
http://processwire.com
Installation:
=============
1. In your site/modules/ directory:
a. Install* FormTemplateProcessorMailer.module
b. If using PHPMailer, navigate to the modules/FormTemplateProcessorMailer directory in a terminal and issue:
$ git clone https://github.com/PHPMailer/PHPMailer.git PHPMailer
(assumes you have git installed)
* 1. Login into ProcessWire admin > Modules.
2. Click "Check for new modules".
3. Click "install" next to the new <module-name>.
2. For the demo, copy all of the files in demo_files/ to appropriate locations
3. Follow the Usage notes here.
Usage:
======
1. In admin, create the fields you want to be part of the form.
Our /contact/ demo requires:
-subject (the demo uses a hidden input but you can also set during runtime module config)
-sender_name [required]
-email [required] (a built-in field under admin > setup > fields > filters)
-message [required]
-phone
Additionally, all of these fields are tagged with contactForm - See demo_files/screenshots/.
2. Create a new template and assign these fields. Note that a physical template file is not needed here.
3. If you will be using a static contact page, choose or create a separate template that will hold the form widget.
4. And then add a page for this template. The demo uses a page called /contact/. See demo_fields/contact.php
for example usage of the contact page.
5. Adjust the settings eg toName and toAddress in contact-form.php and contact.php, and follow the notes
at the bottom of contact.php
Demo:
=====
http://cookbook.dharmiweb.net/ (click on contact)
Comments
Getting something like the demo working also requires the following scripts in addition to the ones mentioned at the bottom of contact.php:
jquery-ui.min.js
mainOnReady.js (get it from the demo page)
Eelke Feenstra 5 years ago ↑0↓0
Works nicely, thanks!
It took me quite some time though to figure out why my data was getting saved, but the e-mails I received were missing all fields besides email. So maybe I can save other people some time with what I learned: Adding labels within your form template context works on the front-end, and in saving the data. But to have all fields show up in the email: make sure the labels are set everywhere by setting them with context: none (default).
Would be a good module, but very hard to implement for a simple form.
The demo is a special case I think.
I need a simple form rendering, and a simple form processing.
Could you help me to make my call for an offer form?
Post a Comment
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Authentication
- Core Modules
- Development Tools
- Email/WireMail
- Field Types
- Import/Export
- Input Fields
- Language Modules
- Language Packs
- Logs/Monitoring
- Markup Generation
- Photo/Video/Audio
- Premium Modules
- Process Modules
- Proof of Concept
- SEO/Accessibility
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
Disclaimer
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.