Step 1: Unzip the Form-Generator..zip file.

If you do not have a software to unzip the Form-Generator.zip file, you can download a free trial version of WinZip by clicking here

After "unzipping" the Form-Generator..zip file you should have the following files as shown below. If you do not have a similar structure as the one below, check to make sure you have your zip program preferences set to allow the creation of directories and to preserve case and long filenames.

Files included in Form-Generator.zip:
Copyright Notice.html
Install Instructions.html
ColorPicker2.js
admin.php
codelock.php
config.php
errors.php
form.php
generated.php
login.php
preview.php
step1.php
step2.php
step3.php
/generated/footer.php
/generated/form.php
/generated/header.php

Step 2: Create a new directory on your website named form (or any name you choose).

Step 3: Upload all files into your newly created form directory. Be sure to set the file permissions of the "generated" folder to 777.

Step 4: Open the config.php file in a text editor (such as NotePad or TextPad) and modify the sections noted in red below for your username and password (with a max. of 30 characters each):

//username
$USERNAME = "admin";

//password
$PASSWORD = "admin";

Also in the config.php file - if you want to place the generated forms in a different folder, configure the section shown in red below to point to the folder (again, that folder will need permisions set to 777 as described in step 3 above):

//the relative or absolute path were generated forms are to be stored
$GENERATE_PATH = "generated/";

Step 5: Login to your admin using the admin.php file. So if your website is http://domain.com and you uploaded the files to the "form" directory, then you would type http://domain.com/form/admin.php in the address line of your browser.

You will be asked for a username and password. Be sure to use the same exact username and password you entered in the config.php file during step 4 above.

Congratulations, you're done :o) For more free PHP and MySQL scripts, be sure to come back to PHPFreebies.com.

To Your Success,
Kevin L. Ocasio
KevinOcasio.com

================================
Useful Information
================================
1: You can edit the header.php and footer.php files in the "generated" folder so your form pages match your existing site design.

2: When uploading the files, make sure to upload them exactly as they were distributed (with the same exact spelling and structure as outlined in step 1 above).

3: CSV and text files are downloadable by simply pointing your browser to the file.

================================
Explanation of Fields In Admin When Creating a Form
================================

Step #1 of The Admin Area:

Form Name - The name of this form such as "Contact", "Info Request", etc., but without the quotes. The form name is required and must only contain letters.

Number of Fields (i.e. 2, 5, etc...) - Such as 2, 3, 4, 5, etc. So if you're going to collect a users name and email address, this would be 2 fields. The number of fields must be a positive number.

Thank You Redirect URL - Enter the URL where you want a visitor redirected to after the successfully fill in your form (i.e. http://yourdomain.com/thankyou.html).

Send An Email - If you want your form to send a thank you email, please specify the format. Otherwise choose No.

Store Data - If checked, data will be stored in a downloadable file

Restrict Use to Specified Domains (Optional) - If you want your form to only be able to be used by one of your sites, then enter the URL of that site. Or leave this empty if it's not needed.

Table Width - Such as 300, 500, 100%, 75%, etc. The table width must be a positive number or percentage.

Table Background Color - Select a color for the tables background with the color picker provided in the admin.

Table Cellspacing - Example, enter a number such as 1.

Table Cellpadding - Same as above.

Table Border Width - Same as above.

Table Border Color - Select a color for the tables border with the color picker provided in the admin.

Font Face - The style of letters such as Verdana or Arial, Helvetica. The font face must be filled in.

Font Size - The size of the form letters such as 2. The font size must be a positive number.

Font Color - The color of your form letters. Use the color picker provided in the admin.

Errors Font Face - This is for the error messages and works the same as "Font Face" above.

Errors Font Size - This is for the error messages and works the same as "Font Size" above.

Errors Font Color - This is for the error messages and works the same as "Font Color" above.


Step #2 of The Admin Area:

Field Display Name - Basically, what is this particular field going to be used for on the form. Such as "Name", "Email", "Phone Number", "Address", etc.

Field Internal HTML Name - This will be used by the form script and would look something like "name", "email", "phone", "address", etc.

Field Type - Choose the appropriate field type based on the info this field will be collectin. For example, for a name or email address, you would simply select the "Text" option.

Field Options - Fill in only if the field type is "select" or "select multiple". The options should be comma separated such as "Male, Female".

Make Field Required - Checking this box makes the field required meaning the user will need to give an answer for this particular field.

Error Message if Required Field Left Blank - So if the "Name" field is required, the error can look something like "Name field cannot be left empty". This is not used if you selected No in the section above.

Extra Check (Optional): These are optional extra checks to be done on the data filled in by the user. Such as making sure an email is formatted correctly or there are only numbers in a phone number.

Custom Check Regular Expression (If Custom Selected): This is for advanced users - /^123/ for requiring the field data to start with 123. Click here for a full description.

Error Message Displayed for Extra Check: Such as "Email address is not in the proper format. Please correct this."


Step #3 of The Admin Area:

Choose The Field Where The User Would Provide Their Email - If you are asking the user for their email (and have set the form to send thank you emails) then select the field where the user would need to enter their email. This will tell the script where to find the email address the user provided so the thank you email can be sent.

Email Subject: The subject of your thank you email such as "Thank You For Contacting Us".

Email Body (Text or HTML) - Your message to the user which can be entered in plain text or HTML.

Admin Email Address - This is your email address. This is where the user data will be sent for your review.

Email Addresses to CC User Data to (Comma Separated) - This is just in case you want the user data sent to several admin people. You would enter the emails such as sales@yourdomain.com, info@yourdomain.com. So they need to be comma separated.

Subject of Email Sent to Admin - This will be the subject of the email sent to you, the admin. For example, if the form the user is filling in is asking them sales related questions, the subject could be "Sales Questions Form Data".


Once The Form is Generated:

Click here to view your new form (link opens in a new window). Be sure to link to your new form from your website so your visitors can use it... - This link will take you to your newly create form (opening the form in a new window). You'll need to add this URL (of the newly created form) on your website so users can access the form. So if the URL to your new form is http://yourdomain.com/form/generated/Sales-Form.php then that's the URL you would add to your site.

Click here to create another form - Pretty self-explanatory :o)