Master Form V4, at it's simplest level, is a form processor. It gathers information from a form on your web page, emails or files the information where ever you designate and then sends the form user to a web page you designate.
This simple process can be built on in numerous ways until you discover that you can do some very sophisticated projects with Master Form V4.
For all the sophisticated projects you can perform with Master Form V4, two simple tools are all we need to instruct Master Form V4 how to accomplish our task.
Hidden Fields in the form we construct.
Templates with Placeholders for email(s), databases, "flowto" web pages.
The form (or forms) we construct can use hidden fields to give Master Form V4 instructions about the task we want it to do.
Master Form V4 recognizes certain hidden field names as commands to execute a certain action. (A complete list of hidden field names is in the Manual.)
No hidden fields are actually required, and if none are used in the form, Master Form V4 will assume certain defaults. Default behavior is described below and in the Manual.
Some instructions that hidden fields relay to Master Form V4:
Which email template (or templates) to use when sending an email upon the form submission.
Example:
(More than just one email template may be specified. Details in the Manual.)
Default: If no template location is provided, no email is sent.
Which database file template to use and the location of the database file to update.
Example:
(Details are in the Manual about how to specify locations and/or multiple templates.)
Default: without both the file template information and the location of the database file, no database is updated.
Where to find the template with instructions for storing uploaded files on the server.
Example:
Default: if no template location is provided, uploaded files are not stored on the server. (Discarded)
Exception: Uploaded files for emailing as attachments are specified in email templates.
A list of fields that may not be carried to the next page of a multi-page form.
Example:
Default: form fields are automatically carried from the previous form to the next ‹ except those form field names listed in this hidden field.
A list of form fields that are required to contain information when the form is submitted.
Example:
Default: If none are specified, no fields are required.
The location of the custom error page, where Master Form V4 inserts error messages.
Example:
The page's location can be specified as an absolute URL or its server location.
Default: If no location is provided, a default error message page is generated as needed.
The location of a "thank you" page-
Example of page to personalize:
Example of page to display without personalization:
Default: If neither of these instructions are provided, Master Form V4 assumes the "thank you" page URL is the same page where the form was submitted, unless the browser fails to provide the form's URL (called the referrer), in which case a message is presented to the form user that no "redirect" or "flowto" information was provided.
Master Form V4 recognizes a number of other hidden fields, all discussed in detail in the Manual.
Another way to tell Master Form V4 what you want done is with Templates.
Templates are a web page, or a database record, or an email designed and formatted according to your preferences. At each place in the template where you want live information inserted, a placeholder is used.
A placeholder is information between double square brackets. The information is often a form field name but can also be other information.
For example, putting this in an email template will print a paragraph containing the email address and the birth date provided by the form user:
A birthday card will be sent to [[email]] on [[birthdate]].
A list of placeholders other than form fields names is discussed in the Manual's Templates section.
Now that we know how to communicate with Master Form V4, we can begin to explore the power of this software.
Let's let our imagination roll...
Perhaps we are holding a digital photography contest. We need to collect the photographs and information about the photographer.
Plus we want to notify several members of a committee that a photograph has been submitted for the contest.
And we want to verify the email address of the photographer.
To accomplish this task, we will use a multi-page form and several templates to instruct Master Form V4 how to manage our contest for us.
Our contest committee has decided we want to collect the photo and information in this manner:
Page one- Collect the name, address and email address of the photographer, plus the title of the photo entry. We need a release statement accepted by the photographer. We want all this information stored in a database on the server.
Page two- If the photographer provides all the information we need and indicates acceptance of the release statement, a page is presented where the photograph may be submitted for the contest. The photo is stored on the server, also.
Alternate page two- if the photographer does not indicate acceptance of the release statement, a page is presented indicating the photo cannot be submitted and the non-acceptance is recorded.
Page three- If Page two is successfully completed (photo submitted), a final page with the completed information is displayed as the first step in confirming the contest entry.
Emails are sent to the committee members and an email is sent to the contestant requesting verification of submission.
One committee member has volunteered to match the original submissions with the verifications so she needs extra information emailed to her.
Fortunately, all this is easy for Master Form V4!
Here is how we will begin:
("nocarry" tells Master Form V4 not to carry the listed form field values to the next page. Unless listed in this hidden field, all form field values are carried to the next page and inserted whenever a [[INSERT_HIDDEN_FIELDS]] or <!--INSERT_HIDDEN_FIELDS--> placeholder is encountered.)
("requiredfields" tells Master Form V4 which form fields must be filled by the form user.)
("emailfields" tells Master Form V4 to check the listed fields for proper formatting of email addresses.)
Form field names can be anything you want (with the exceptions listed in the Manual).
We will use radio buttons to determine which "second page" the form user will see. If the form user selects the "yes" radio button (e.g. yes, the Release Statement is accepted), he will be directed to the next page in the entry form when the submit button is clicked. If the "no" radio button is selected (e.g. no, the Release Statement is not accepted), the user is directed to the alternate page two. (No entry)
Clicking on the Submit button also checks to see if the required fields are filled in (per the hidden field name="requiredfields").
View page one here. (Example file only- not a live form.)
("flowto" indicates where the user will be directed to when the submit button is clicked.)
("requiredfields" tells Master Form V4 which form fields must be filled by the form user.)
("emailtemplate" tells Master Form V4 the location of the email templates to be used to send email. In this case, we want two different emails sent, so two templates are provided.)
("filetemplate" tells Master Form V4 the location of the file that will give instructions for creating and/or updating a database file ("dbfile"))
("dbfile" tells Master Form V4 where to put the database file after it is written.)
(the file specified in the value of "uploadedfilesaveinfo" gives Master Form V4 instructions on what to do with the files that will be uploaded to the server from this page's form.)
This is the code that tells Master Form V4 where to write the values of the hidden fields carried forward from the previous page.
This form field allows the form user to browse their harddrive to locate and upload a file. Only images in the .gif, .jpg. or .jpeg format will be uploaded in our form.
We will also use two check boxes:
In addition to the "hidden fields" and "form fields", we will want to have Page 2 display some of the information collected from Page 1. We do this with "placeholders".
[[firstname]] [[lastname]] [[streetaddy]] [[city]], [[state]] [[zip]] [[email]] Name of your contest entry: [[photographname]]
View Page two template here. (Example file only- not a live form.)
Now, when the submit button is clicked, four things will happen.
All the data will be written to our database file. (See the "filetemplate".
The photo will be stored on the server. (See the "uploadedfilesaveinfo" template.
Emails will be sent as follows:
One email to all the committee members alerting them that a contest entry has been made. (See this "emailtemplate".)
One email to the contestant requesting verification of the contest entry. (This also serves to confirm the email address given.) Also a copy of this email is sent to the committee member who will be verifying entries. (See this "emailtemplate".)
Page three will be presented to the contestant.
Page Three will be a "Thank you for your Entry" and will be personalized with some of the information collected from previous pages. It, too, will use placeholders to display information collected from previous pages.
View Page three template here. (Example file only- not a live form.)
Alternate Page Two is presented, of course, when the Release Statement question is not answered in the affirmative. It has no placeholders so it does not display personalized information.
View Alternate Page Two here. (Example file only- not a live form.)
Once we make our forms available on the web, each contest entry is handled quickly and automatically by Master Form V4.