Subscription Form Processing with Master Form V4
Master
The purpose of this form is to record the subscription information from your website and then send it to the list software or service. It will work with any software or service that accepts emailed subscriptions.
Someone provides their email address (and name and other information, depending on the form you use). They click the form's submit button.
When the form is submitted to Master
-
Updates a database with the submitted information.
-
Sends a subscription email to the list software/service. (The list software/service then handles the subscription after it receives the email.)
-
Sends an email to the new subscriber.
-
Sends an email to you, the webmaster.
-
Presents a "thank you" page to the new subscriber.
Forms, emails, databases, and "thank you" pages can all be formatted the way you want and contain the information you want.
I'll show you how to do it, step by step. If anything is unclear, or if you wish to modify the examples provided here, please consult the Master
Subscription List Building with Master Form V4
First, make the form. Here is an example form you can use:
<form method="POST" action="/cgi-bin/mfv4/MasterFormV4.cgi"> <input type="hidden" name="requiredfields" value="email,name"> <input type="hidden" name="emailfields" value="email"> <input type="hidden" name="dbfile" value="data/singleoptin_subscribers.csv"> <input type="hidden" name="filetemplate" value="templates/singleoptin_subscriberdata.txt"> <input type="hidden" name="emailtemplate" value="templates/singleoptin_subscriptionemail.txt"> <input type="hidden" name="emailtemplate" value="templates/singleoptin_subscriberemail.txt"> <input type="hidden" name="emailtemplate" value="templates/singleoptin_webmasteremail.txt"> <input type="hidden" name="flowto" value="/singleoptin_confirmation.html"> <p> Your email address: <input type="text" name="email" style="width:200px;"> </p> <p> Your name: <input type="text" name="name" style="width:200px;"> </p> <p> <input type="submit"> </p> </form>
Verify the URLs in the FORM tag and the hidden fields are correct. Adjust as necessary.
Here is how the above form would print on your web page.
Following is a short explanation of each hidden field, along with an example if the hidden field refers to a template.
Hidden field name="requiredfields"
This hidden field's value contains a comma-separated list of the field names that are required to contain information before the form can be successfully submitted.
Hidden field name="emailfields"
This hidden field's value contains a comma-separated list of the field names that must contain a correctly formatted email address if they contain any information at all.
Hidden field name="dbfile"
The file name and location of the database is specified here. Information submitted with the form is appended to the file, the file created if it doesn't already exist.
Hidden field name="filetemplate"
The template specified in this hidden field is used to prepared the data record prior to appending to the database file. Here is an example database record template:
**INITIALIZE_DATABASE_WITH_FIELD_NAMES** "[[WEEKDAY]], [[LONGMONTH]] [[DAY]], [[YEAR]]","[[HOUR2]]:[[MINUTE2]]:[[SECOND2]]","[[email]]","[[name]]","[[IP]]"
The above is a template for a comma-separated values (CSV) file, recording
- the server date,
- the server time,
- the email address provided on the form,
- the name provided on the form, and
- the IP address of the form user.
The first line of the template tells Master
Hidden field name="emailtemplate" (three)
Three email templates are used for the list software/service, for the new subscriber, and for you, the webmaster.
Here is an example email template for the list software/server:
Return-Path: <[[email]]> From: [[if_name]]"[name]]" [[/if_name]]<[[email]]> Reply-To: [[if_name]]"[name]]" [[/if_name]]<[[email]]> To: listserver@example.com Subject: Subscribe [[email]] Subscribe [[email]]
You'll notice the versatile
Here is an example email template for the new subscriber:
To: [[email]] From: "Ezine LLC" <ezine@example.com> Subject: Your Ezine subscription has been entered Welcome aboard! To show our appreciation, we're making available ... Thank you! Webmaster Ezine LLC
Here is an example email template to be sent to you, the webmaster:
From: [[email]] To: webmaster@example.com Subject: Opt-In Subscription! This was submitted: [[if_name]]Name: [name]][[/if_name]] Email: [[email]] IP Address [[IP]]
If you prefer to have a copy of the email being sent to the list software/service instead of (or in addition to) the webmaster email, the list software/service email can have a Bcc: line added to it. Here is an example:
Return-Path: <[[email]]> From: [[if_name]]"[name]]" [[/if_name]]<[[email]]> Reply-To: [[if_name]]"[name]]" [[/if_name]]<[[email]]> To: listserver@example.com Bcc: webmaster@example.com Subject: Subscribe [[email]] Subscribe [[email]]
Hidden field name="flowto"
If you do not wish to have the "thank you" page personalized, use hidden field name="redirect" instead of name="flowto"
When hidden field name="flowto" is used, Master
Here is an example "thank you" web page template:
<html> <body> <p> Your subscription has been accepted[[if_name]], [[name]][[/if_name]]. </p> <p> It is is recorded as [[email]] </p> </body> </html>
Implementation
Put the web page form on your server, and the templates in the locations specified in the form's hidden fields
Then test it. Verify that all emails are sent and the database is updated.
When it works the way you want it to, and you're ready to do so, put the form on a publicly accessible web page and link to it.
Will Bontrager