WEB EDITOR
SPECIAL PAGES
CONTACT REQUEST (PHP FORM)
Overview
The PHP Contact Form page contains a form that visitors can fill in and send automatically to the e-mail address specified in Request Settings panel. In contrast to the Mailto Form, the PHP Contact Form is processed by a PHP script.
This
can be any kind of feedback form - quote request or contacts form.
 |
Please, note that we have a Video Tutorial available on this topic.
You can check it out at EZGenerator Tutorials. |
To add a Contact Form page to your site:
- Click the Web module icon in the Navigation
Bar.
- From the File menu, select Add.
- In the Add Page window, select Contact Request for
a page type.
- Choose one of the layouts containg PHP Contact Form.
- Set any other options you want and press OK.
Basics
The PHP Contact Request Form contains some or all of the fields available
in your Contacts database. After visitor fills out the form, he uses
the SEND button to send the form content as a formatted message.
 |
You can add a Memo
field to your Contacts database
and use it like a message box in the form. |
Two pages are automatically generated along with each Php Contact Form page - Error page and Submit page. Error page will display error message in case the form is not filled correctly. Submit page will be called after successful form submit.
You can edit default content for both Error and Submit pages.
Request Settings
The following properties are available in the Request Settings panel:
MAIN
AUTO-REPLY
- Use Auto-Reply (check
box) - Auto-reply function will send e-mail to visitor of your site when form is successfully submitted.
- Subject (text
box) - This option sets the auto-reply email subject.
Note: You can use form field macros in this property. Example: Dear %P_name%, you request has been submitted.
- Html Message (url) (text
box) - This option sets the auto-reply html mail message.
- Message (text
box) - This option sets the auto-reply mail message.
MESSAGES
- Email Not Valid (text box) - This message will be displayed in case user fills invalid email address.
- Emails Not Match Msg(text box) - This message will be displayed in case user fills different email addresses in Email and Confirm Email fields (applicable only if Confirm Email field is set).
- Field Empty (text box) - This message will be displayed in case user skips required field.
- Checkbox Unchecked (text box) - This message will be displayed in case user does not check required checkbox.
- Captcha Msg (text box) - This message will be displayed in case user fills wrong captcha code (applicable only if Captcha is enabled in the Contact Form).
Accessible Fields and Special Objects
You can insert form controls for any field in your Contacts
database (the yellow buttons in the Fields list),for example, create a text
box for a text field, check box for a boolean field etc.
The following special
objects are accessible in the Contact Request page:
- Submit Button - Creates an image
button "send", which sends the form content. The following initialization properties
are available: Caption (text
box) - Lets you set the button caption.
- Reset Button - Inserts an image button
"reset", which clears all contents in the web form. The following
initialization properties are available: Caption (text
box) - Lets you set the button caption.
- Hidden Field - Allows
you to add hidden fields to your form. Hidden fields are not visible or accessible
to the site visitors, but can be used to pass certain data, for example,
the page from where the form was sent, or to help you to categorize the
information
when you receive it. The following
initialization properties are available: Name (text
box) - Lets you set the field name; Value (text
box) - Sets the field value.
- Custom Field - Allows
you to add custom fields to your request page. Custom fields are fields not connected to contacts/catalog database. Use custom field to create more advanced forms. The following field types are available: Text, Memo, Listbox, Checkbox, Radio, File, Button, Date and Password. When you insert custom field you have to set Caption, Name, Type and Value. Use the Required checkbox if you want to set the custom field as required.
- Default Submit Button - Creates standard HTML submit
button "send", which sends the form content. The following initialization properties
are available: Caption (text
box) - Lets you set the button caption.
- Default Reset Button - Inserts standard HTML rest button
"reset", which clears all contents in the web form. The following
initialization properties are available: Caption (text
box) - Lets you set the button caption.
- Nopagefooter - Inserts NOFOOTERONPAGE macros in current page, which means that fotter will not be appended on this page. See Macros.
- Tell a Friend - This object generates
link to Tell a Friend page.
- Captcha - This object generates
CAPTCHA in your request page. Captcha is a mechanism that will guarantee only humans may submit your request form. Here is how CAPTCHA works - a random code is generated and user is required to type this code in an edit box. The form cannot be submitted until the user correctly fills the code. Note that the random captcha code will be displayed as image, only if your server supports PHP GD library. Otherwise the random code will be presented as plain text, which is not so secure.
Confirm email feature: You can insert second email address field in your request form to be used as confirm email field. This way you may require users to confirm their email address before submitting the form. To accomplish, this drag-and-drop second email address field from Fields panel, and change its name - for example, if your normal email field has name "EmailAddress", the confirm email address field should have name "EmailAddress_confirm".
Upload File field: You can insert Upload File field in the Contact Form and allow visitors to upload certain file(s) when submitting the form. You will receive this file(s) as attachment along with the notification email that is sent. To accomplish this, drag-and-drop custom field with type File in the Contact Form (see above). You can insert multiple File fields in a single Contact Form.
Contact Form in combination with Lister: You may need to call Contact Form from Lister page, so that some information to be passed from Lister to Contact Form. For example, you need to place button Ask for Price on Lister Categories page (next to each product), so that when visitors press it they will be redirected to Contact Form with some product information filled - Short Description, Notes or any other. To achieve this:
- Go to your Lister Categories page and add button Ask for Price.
- Link this button to your Contact Form- use Link Type: internal and navigate to your Contact Form. Then change Link Type from internal to URL and add ?%fieldname% at the end of the url. Example: ../documents/114.html?%Notes%.
- Go to your Contact Form and open Notes field properties and add following into Events editobox: id="mynotes"
- Go to your Contact Form, use Insert Html and type the following javascript in it (make sure to insert this code beneath the form):
<script language="JavaScript" type="text/javascript">
<!--
var lb=document.getElementById('mynotes');
lb.value = unescape(window.location.search.substring(1));
//-->
</script>