Do you want to Organize your Programs menu or setup your Quick Launch Tool Bar? Find out how by watching this screencast.

Mailing List

To join my mailing list,
enter your email address
and press Subscribe:

News

AzerTech.net News Feed

The Software Development Cycle
When BNT Solutions (http://www.bnt-solutions.net/) was incorporated in 2001 there was one goal in particular that ran as a thread through...



Introduction to Networking
The very first time I tried to setup a server at home I discovered something unexpected: What I thought was going to...



Subscribing to a Mailman list from any web page
It happens quite often that you want people to be able to subscribe to your Mailman mailing list from a...


Montreal Family

Time for Canadians to speak!
The Government of Canada has begun a nationwide series of consultations on copyright modernization.



Linked-In for business and pleasure
The Linked-In crowd will try to convince you that their service is good for business. This is more...



A sad day for free speech and copyright law
Here is some important, well written commentary from William Patry and, in response, Pamela Jones of Groklaw. First, illiam Patry explains why he...


EZ Web Forms via E-Mail Print
User Rating: / 0
PoorBest 
Article Index
EZ Web Forms via E-Mail
Page 2
Page 3
Page 4

Installation

The ezform.inc file should be saved in a convenient directory and included somewhere in your web page.

If you are running a CMS like Joomla or Drupal or Visual Power Web, you might want to include this file in one of the startup scripts for the CMS so that non-technical users can use it in their pages. Otherwise, each web page that wants to present and process a form will have to include this file first:

include(  "ezform.inc"  );

Default Values

At the top of the class is a list of variables and their default values. These values should be edited to make sense for your web site.

Setup

For each form that the user wants to have on his web page, it is necessary to create an instance of the form object. Because the ezform class automatically assigns a default name to the form, you can create the first form object like this:

$form  = new  ezform ();

After executing the above line, the $form variable contains an object of type ezform. By default, the name of the web form that this object will emit will be "form2email"

If you want to have more than one form on the page, you should assign different form names to each one, like this:

$form1  = new  ezform ( "first_form" );
$form2  = new  ezform ( "second_form" );

For each form, it is probably necessary to set the from, to and reply_to email addresses (although the defaults may be acceptable,) along with the subject/title of the form. For example:

$form -> from      " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it " ;
$form -> to        " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it " ;
$form -> reply_to  " This e-mail address is being protected from spam bots, you need JavaScript enabled to view it " ;
$form -> subject   "Appointment Request" ;

You might also want to tell the object what to say to the user when it sends an email containing form data:

$form -> confirmation  "<font color=red>"
            
"<b>Information Sent/Envoyer</b>"
            
"</font>"
            
;

The confirmation above, Information Sent, is the default confirmation sent by ezform. If this is acceptable to you, you don't need to change it.



 
< Prev