Using The Mailform Application

Your organization may have a myriad of different kinds of information that it wants to gather from its users. Other Ellington organizations may have a myriad of different information that they want to gather from their users. Some of the submission forms will be permanent e.g., a news tip submission form. Other may be temporary, like a cutest child photo contest. In order to accomodate this wide range of data gathering, Ellington provides the Mailform application.

A mail form allows you to create ad hoc HTML forms to gather any data you need, have it restricted to registered users only or free to the public, and direct the collected data to any e-mail address(es) you may want. Your staff can then use that data as necessary on the site or in your publication.

How to Use Mailforms

A template designer will need to set up mailforms. The forms are created to collect data pertaining to submissions. For example, if a public user wishes to submit information about Weddings, Births or Obits, a different form may be created for each. Once the forms are created, any edits to the designated email account, default subject or redirects, will be done in the mailforms application.

Example

Navigate to the Mailform Module and Click directly on the Mail Forms Application link.

Mailforms
  1. You may view a list of all previously created Mail forms.
  2. You can sort these forms by using the filter selections to the right.
  3. Click Directly on Slug name to edit previous mail form.
  4. Click on add mail form to create new form.
Add Mailform
  1. Click Save to Complete entry.

Mail form fields

Slug

A unique value consisting of letters, numbers, underscores or hyphens. Examples may include:

  • obituaries
  • 45-day-deal
  • 2_week_vacation_contest

Recipients

A single e-mail address or a list of e-mail addresses separated by spaces or new lines.

Redirect URL on success

A URL to redirect the user to upon a successful form submission.

Redirect URL on failure

A URL to redirect the user to upon a failed form submission.

Default subject

The subject line of the e-mail that will be sent to the recipients.

E-mail “from” field (optional)

The name of the form field that will supply the “from” address for the e-mail sent to the recipients. This is useful if you are collecting the user’s e-mail address and you want your staffers to be able to simply click “Reply” to respond to the user.

Default e-mail from

If “E-mail ‘from’ field” is not supplied, or a value is not collected, the e-mail sent to recipients will be from this e-mail address.

Attachments allowed

Select this if you want the user to be able to upload and send files with the form.

“Attachments allowed” simply tells the validator to let attachments through. You must still template the form to allow attachments by:

  1. setting the form’s enctype attribute to multipart/form-data,
  2. including a file input field.

Registration required

If selected, users will be required to login in order for the form to submit.

This does not keep anonymous users from viewing or filling out the form; it will simply error when they submit it. If you want to hide it from them you must put it some where on your site where login is required e.g., a login-required flatpage or somewhere in there account settings.

Sites

Select any sites that you want this mail form to be available on.

This simply tells Ellington to make the mail form available for the site. You must still template the form on any site that you want it used on.

Creating a mail form

There are two steps involved in creating a mail form.

  1. Creating the mail form object in the admin.
  2. Adding the mail form to a template.

Adding the mail form object

From your admin, find the Mailform module and click on the mail form’s “+ Add” link. Fill in all necessary information. For this example let’s say that we are adding a form for submitting wedding announcements.

Field Content
Slug
wedding
Recipients <your_email_address>
Redirect URL on success /submit/success/
Redirect URL on failure /submit/error/
Default subject Wedding announcement submission
E-mail "from" field email
Default e-mail from <some_relevant_organization_email_address>
Attachments allowed Yes
Registration Required Yes
Sites <any_relevant_site(s)>

As you can see, at this point you need to know where you want the page to redirect to for successful and erred submissions, respectively. The simplest way to handle this is to create a generic flatpage for each of these purposes.

For example, the success flatpage may resemble the following:

Field Content
URL
submit/success/
Title
Submission successful
Content
There appears to be an error in your form submission. Please go back to the form and make sure all of the required fields are filled out.
Sites
Make sure you select the same sites as any of your mail forms may be assigned to
Registration required
There is no reason to enable this as it is only an error page.
Template name
This can be either a default template or a custom one, depending on how you want to organize things

You could do something similar for the error page.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.