EZ Web Forms via E-Mail Print
Sunday, 30 April 2006

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

Mailing List

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

Login Form






Lost Password?
No account yet? Register

AzerTech RSS


Copyright © 2010 by AzerTech.net, All rights reserved.
Powered By BNT Solutions, Inc.



Note: Site functionality is impaired when using IE6 or less.