Ajax Poll Script
URL Shortening Script
Ajax Likes Script
Text Ad Script
Fade-In Slideshow
Address Book Script
Form2DB
Lead Follow-Up Database Script
php Infinite Scroll
Ajax Poll Admin
PayPal IPN + eProduct Delivery Script
AdFreely -Ad Board Script-

Form2DB: FormMail Script + Back-end Database

Ver 1.14
CU201-114

Download
Contact Us
Contact Us
  • Name
  • Email
  • Tel
  • Subject
  • Message
  • Application Form
    Application Form
  • Business Name
  • First Name
  • Last Name
  • Tel
  • Fax
  • Cell
  • Street1
  • Street2
  • City
  • State
  • Zip
  • Country
  • Email
  • Web Address
  • Note
  • Appointment Form
    Appointment Form
  • Name
  • Contact Person
  • Email Address
  • Telephone No.
  • Mobile No.
  • Other Info
  • Inquiry Form
    Inquiry Form
  • First Name
  • Last Name
  • Tel
  • Extention
  • Mobile
  • Email
  • Street1
  • Street2
  • City
  • State
  • Zip
  • Note
  • : Scripts generated by Address Book Script Builder
    : Scripts generated by Form2DB Builder

    This is a free form-mail PHP script with a back-end database. The script allows visitors to fill a web form and send the form data to a web site administrator. The script also saves the form data to a MySQL database so the administrator can search, view, edit, and delete the forms from a web browser.

    You can manually customize form fields or use the online tool, Form2DB Builder to set them up.

    To manually customize it, please see Customization Quick Guide.

    Form2DB Builder is a online tool that guides you through the steps of building PHP form script. To start Form2DB Builder, click this link.

    License

    GPL

    Demo

    Installation Guide

    Quick Feedback to Tom, the developer

    If you have any suggestions or find any problems, please leave them as a comment down below. we'd appreciate the feedback!

    Name:
    Subject:
    Comment:
    Email: (Will not appear online)
    Posted by Sharan
    2017-07-04

    Hi Tom,
    Need some custom form with hidden fields & Date input and edit/update above fields in admin Panel.
    Scenario:
    Customer submits product service form.
    Tracking issues, updating status whether ... Read More
    Posted by Tom
    2017-07-05

    You can replace <?php echo $hm->Zb('rs:def:field-name'); ?> with a hidden field like <input type="hidden" name="field-name" value="..."/>
    Posted by Michael P
    2017-06-17

    I mean non-editable for non-admin?
    Posted by Tom
    2017-06-19

    >I mean non-editable for non-admin?

    Then just disabling the save button is the easiest way. It would be a lot of work to make all fields non-editable.
    Posted by Michael
    2017-06-15

    Sorry to bother you again Tom.

    Can you explain a way to make an input field non editable. After I insert a value in an input field is there a way to make it so the field cannot be edited.
    Thanks
    Posted by Tom
    2017-06-16

    >After I insert a value in an input field is there a way to make it so the field cannot be edited.

    You mean non-editable for both admin and non-admin? If yes, there is no quick solution. You can ... Read More
    Posted by Michael P
    2017-06-07

    Hi Tom. I have made numerous modifications to your software and it runs perfectly.
    My situation is this: I have a front end that grabs an input value from the user. The user is then directed to my ... Read More
    Posted by Tom
    2017-06-08

    To initialize a form field, open web/form/app/cls_ps_(table-name).inc.php
    Find the lines shown below:
    ... Read More
    Posted by luyanda
    2017-04-18

    hi when i fill the form on a mobile phone i get an error saying "this form has already been submitted"
    Posted by Tom
    2017-04-19

    > i get an error saying "this form has already been submitted"
    I think cookies are disabled in your browser. It happens whether it's mobile or desktop if cookies are not available.
    Posted by Michael
    2017-04-06

    Hi Tom. I have been using your software for almost three years now. I'm totally happy with it. However the machine that i was running on crashed and i had to take my original re-programming and ... Read More
    Posted by Tom
    2017-04-07

    Hi, You generally experience error 501 when the recipient email address has incorrect format. Try other recipients email address and see if it works.
    Posted by George
    2016-11-07

    Thanks for your prompt reply.
    We want to make a registration form in a database with information not the user is typing and will not appear on the form.
    The automatic information will be presented by ... Read More
    Posted by Tom
    2016-11-08

    >The automatic information will be presented by different articles we have on our website example

    OK then don't bother the form. You are making things more difficult.
    You should write a script that ... Read More
    Posted by George
    2016-11-06

    Hello Tom,
    how to replace
    <?php echo $hm->Zb('rs:def:f0008'); ?>
    with:
    <input type='text' name='f0008' value='<?php echo date("j/m/Y - G:i"); ?>' readonly/>

    and

    <?php echo $hm->Zb('rs:def:f0009'); ... Read More
    Posted by Tom
    2016-11-07

    > <input type='text' name='f0008' value='<?php echo date("j/m/Y - G:i"); ?>' readonly/>

    I think you want to display data in a different format?
    If so, please read this article ... Read More
    Posted by Allyn
    2016-07-29

    Thanks Tom,
    The second part and important part of my question was, does the person sending the form also see the result of that hidden field if I configure the form to email the user the copy of ... Read More
    Posted by Tom
    2016-07-29

    > does the person sending the form also see the result of that hidden field

    Yes if the field is included in the email template. If you don't want to include in the email, then remove the field from ... Read More
    Posted by Allyn
    2016-07-29

    Tom, I would like to add a hidden field containing an access code to be sent to the user of the form once the form is submitted. I understand I will need to change a part of the code so that the user ... Read More
    Posted by Tom
    2016-07-29

    >I would like to add a hidden field containing an access code to be sent to the user of the form once the form is submitted

    The first step to add a hidden field is the same as adding a regular text ... Read More
    Posted by Tahmidul
    2016-07-16

    Hello Tom,
    I need to know, how can I change the default ID number ?
    I want to use 1,2,3 instead of 1001,1002,1003 !

    How can I do that ?
    Posted by Tom
    2016-07-17

    Hi,

    >I want to use 1,2,3 instead of 1001,1002,1003 !

    Open web/install/sql/sql.txt in a text editor and find the following line:
    ) ENGINE=MyISAM AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8;
    1001 is ... Read More
    Posted by Gregor
    2016-06-20

    Hi! Where can i rename the Buttons "Next", "Back",...? Would be great to use the Form in other languages.
    Posted by Tom
    2016-06-21

    Hi, you can edit it in the templates. The template path is web/form/tpl.(table-name).reg_page1.inc.php and web/form/tpl.(table-name).reg_page2.inc.php.
    Posted by Ronak Patel
    2016-05-23

    Sir i am little weak in php. In which file i should go and edit to add a text and button, linked to info page in admin and staff panel?
    Posted by Tom
    2016-05-23

    You can modify templates. The template files are prefixed with tpl. and you can find it in the web/staff/ folder.
    Posted by Ronak Patel
    2016-05-22

    Sir, is there any form available with radio button and checkboxes together in Form2DB??
    Posted by Tom
    2016-05-23

    Hi,

    >is there any form available with radio button and checkboxes together in Form2DB??

    If you mean combining radio buttons and checkboxes in a field, no there is no such built-in feature. But of ... Read More
    Posted by Ronak Patel
    2016-05-19

    Thank you very much Mr.Tom. Now form is working awesome.
    Posted by Tom
    2016-05-20

    Great!
    Posted by Ronak Patel
    2016-05-17

    Thank you Mr.Tom for your reply and I respect your help and support to me. Actually ya i didnt got any error message. Form was successfully send. But didnt reached up to my mail box. I even tried it ... Read More
    Posted by Tom
    2016-05-18

    >I even tried it with my gmail, yahoo and hotmail mail-Ids.

    OK then most likely your webserver is not sending out. Please ask your server administrator to check the mail server log. It could be ... Read More
    Posted by Ronak Patel
    2016-05-11

    Thank you very much for such wonderful support. Your website is truely amzaing. I had customized and downloaded forms from here. Form is getting feeded in DB but it is not getting mailed. Email is ... Read More
    Posted by Tom
    2016-05-12

    Did you get any error message when you submited the form? Since you didn't write it, I'll assume there were no error messages. Then most likely the form was successfully passed to your mail server ... Read More
    Posted by Arie Wolf
    2016-03-18

    Hey Tom,

    Thanks for creating this tool, I've found it extremely useful. I was moving some files over from one server to another, and am now receiving a 'network undreachable' email error. Do you ... Read More
    Posted by Tom
    2016-03-20

    Hi,

    >am now receiving a 'network undreachable' email error.

    The email configurations for the previouse server does not seem to be working for the new server. Review the email configuration file. ... Read More
    Posted by Manu Mart
    2016-03-09

    Hi, is there a way to update the records on the staff edit area and stay on the same page, is redirecting back to the search page. Is difficult when there are several records to be updated . ... Read More
    Posted by Tom
    2016-03-11

    >is there a way to update the records on the staff edit area and stay on the same page, is redirecting back to the search page.

    Currently, there isn't an easy way to do it. I think your idea makes ... Read More
    Posted by Watcharaphong Chuenpimonchankit
    2016-02-05

    Hi.
    Form2DB can upload photo or attach file?
    Thanks
    WC
    Posted by Tom
    2016-02-06

    Hi, sorry file upload is not implemented in Form2DB.
    Posted by Ashok Bhamla
    2015-12-10

    my email
    is
    info@pmdgroups.com
    smtp- smtp.zoho.com
    hostname-

    can you send me sample file without comment,
    i am not good in coding.

    //<?php exit; ?> ... Read More
    Posted by Tom
    2015-12-11

    Hi, your configurations look fine to me. Of course, I can never be sure if you supplied correct information. For example, the email you typed may not exist or the password you typed could be wrong. ... Read More
    Posted by Vasif
    2015-10-31

    Hi. thank you for this best scripts. i installed thsi script but i want change some functions.
    1. don't show all members info in Search Results.
    i want show result which i search in Search ... Read More
    Posted by Tom
    2015-11-04

    Sorry, I can't answer that. The questions are beyond the scope of this feedback box. Definitly it's possible to modify it that way, though.
    Posted by Brooks
    2015-09-16

    Is there away to prevent the same person from entering the form more than once? After form is processed refresh the form to new form?

    I reinstalled the form/database on a new computer and it tells ... Read More
    Posted by Tom
    2015-09-18

    Hi,

    >I reinstalled the form/database on a new computer and it tells me "This form has already been submitted", but the entry is not even in the database.

    It sounds like you have session problem. ... Read More
    Posted by Magdy
    2015-09-05

    Hello,
    In form2db script, i created a form with several textarea fields.
    The problem is in the admin page (staff) which need to print the form but the content is not displayed as there is a scroll ... Read More
    Posted by Tom
    2015-09-07

    >The problem is in the admin page (staff) which need to print the form but the content is not displayed as there is a scroll bar.

    I think the easiest way is to write javascript that grabs the text ... Read More
    Posted by T
    2015-08-13

    Hello! Thank you for an amazing script. Is there any way to add a default value to one of the fields>
    Posted by Tom
    2015-08-19

    >Is there any way to add a default value to one of the fields

    Yes. You can assign a default value to XA_INIT_VALUE. To do so, open web/codelib/asc/df.fl.(table-name).inc.php. Insert a line like this ... Read More
    Posted by Bob
    2015-07-31

    Tom
    How do I do to display the delete button if is admin in /staff/tpl.example.search.inc.php ?

    an idea:
    <!-- ?php include( 'include/tpl.sr.top_bar.inc.php' ); ? -->
    <?php include( ... Read More
    Posted by Tom
    2015-08-05

    include/tpl.sr.top_bar.inc.php contains more than the delete button, so you should open the file and edit the delete button only. Use the following the code snippet to create admin-only lines in the ... Read More
    Posted by Allyn
    2015-07-28

    Tom, The form works and the database script works but I'm not getting email. I have tried to test it by having the submitted form sent directly to my @live email account and to my email forwarding ... Read More
    Posted by Tom
    2015-07-29

    Hi, if the form didn't show any error messages when you submitted the form, then the email was successfully passed to your mail server. For some reasons, the email was not delivered to the recipient. ... Read More
    Posted by Bob
    2015-07-27

    Tom
    and while you think some about that, can I change something for the staff can't see the edit icon ?
    Posted by Tom
    2015-07-29

    Sorry, currently there isn't an easy way to add a new staff type. It's definitly possible though. The currently available function is $sys->IsAdmin() only. The function tells whether the user is an ... Read More
    Posted by Bob
    2015-07-24

    Hi Tom
    I need only the administrator can edit or delete records or a new staff like supervisor to edit and delete.
    The staff only view records.

    It´s possible ?
    Posted by Tom
    2015-07-24

    Hi, currently user groups are admin and non-admin only. As you described, more user types would definitely make it more useful and convenient. Thank you for your suggestion!
    Posted by Allyn
    2015-07-21

    Found the file - thanks
    Posted by Tom
    2015-07-24

    Great!
    Posted by Allyn
    2015-07-21

    Hi Tom, I would like to edit the Thank you reply once the form is sent in. Where would I find this?
    Posted by Bob
    2015-06-25

    Hi
    I need to put a field <input type="file">
    Is it possible?
    Posted by Tom
    2015-06-27

    Sorry, it's not possible.
    Posted by Tahmidul
    2015-06-21

    Hy Tom, I'm sorry for late feedback !
    I'm really happy to say your second method working perfectly for me !

    Thank you very much for your co-operation ! :)

    Will you please do me another favor ?
    When ... Read More
    Posted by Tom
    2015-06-22

    Open web/staff/app/df.fieldlist.inc.php and find the following code:
    ... Read More
    Posted by Tahmidul
    2015-05-30

    Hello Sir,
    I'm really to sorry to say, it still makes him/her as "Active" !

    I've changed 'reg'=>'Y' to 'reg'=>'N' from "web/codelib/asc/df.fl.members.inc.php" as you say ! But sorry to say, it ... Read More
    Posted by Tom
    2015-06-03

    OK, try this. Open web/form/app/cls_ps_(table-name).inc.php and find the following code [Line 229-232]
    ... Read More
    Posted by Tahmidul
    2015-05-27

    Hi,
    I like your script very much ! But I've a little bit problem with this script.
    You know very well, when someone filled up this form, it automatically makes him/her "Active".
    But, I need him/her ... Read More
    Posted by Tom
    2015-05-28

    Hi,

    >I need him/her as Non-Active

    Open web/codelib/asc/df.fl.(table-name).inc.php and find the following array.
    ... Read More
    Posted by dennis
    2015-04-13

    The form works and the database script works but I'm not getting email. Here is the error:

    EMAIL ERROR :
    Connection refused(111)

    If anyone had this problem before, please let me solve it!
    Posted by Tom
    2015-04-30

    Hi,

    >Connection refused(111)

    OK, so the problem is just what it says, the other email server refused the connection. You can't find the cause on your end. You need to ask the administrator of the ... Read More
    Posted by Marcelo
    2015-04-10

    In Reply to TOM "Re: Default value
    Posted by Tom21 hours ago"

    Tom, budy, you just saved my life on this matter!!
    I have researched about this since last saturday, almost a week...
    I never imagined ... Read More
    Posted by Tom
    2015-04-30

    Glad to hear that!
    Posted by Marcelo
    2015-04-06

    Hi, thanks again for this great code.

    Is there a way to make a field of tpl.contato.reg_page1.inc.php fixed and hiden?

    Best Regards from Brazil.
    Posted by Tom
    2015-04-09

    Yes, you can. First, run the form and check the HTML source code of the form.
    Locate the input field that you want to convert to hidden. It looks like this
    <input type='text' ..... >
    Copy it to a ... Read More
    Posted by Marcelo
    2015-03-30

    Thanks a lot to provide us with this wondefull form!!!!
    Posted by Tom
    2015-04-09

    You are welcome :)
    Posted by Mike Robertson
    2015-03-06

    Tom,
    Thank you! This sounds VERY promising!
    However when I removed the 'tpl.frame.login.inc.php' file, I get a message reading: "Location : CSysCmd/Output
    Message : Tempalte ( tpl.frame.login.inc.php ... Read More
    Posted by Tom
    2015-03-19

    Hi,

    This article explains how to remove the login page.
    http://www.phpkobo.com/article--m2635
    Posted by Stefan
    2015-02-26

    Hi, first sorry for my english....
    When I submit the Form, I receive the following message:
    "This form has already been submitted"
    The first Form could be sendet..... Starting from the second try, it ... Read More
    Posted by Tom
    2015-03-03

    It's by design. It prevents you from posting the form twice.
    If you want to disable it, then open web/form/app/cls_ps_(table-name).inc.php
    and comment out the following code.
    ... Read More
    Posted by Mike Robertson
    2015-02-25

    Tom,
    First off, BEAUTIFULLY implemented script!

    Is there a way to display the content of the database without having to enter a username / password. And consequently not have the ability to delete / ... Read More
    Posted by Tom
    2015-03-03

    You can copy the staff folder and rename it to guest or something.
    Keep the staff folder for the administration. Remove the login page from
    the guest folder to show the data to guests.
    Posted by Juan Manuel
    2015-02-11

    Hi! Do we have a form to prevent duplicate entries based on a certain field? Say, the username is an input... and I want to check against the DB that the same username is not already registered. On ... Read More
    Posted by Tom
    2015-02-17

    Hi,

    >Do we have a form to prevent duplicate entries based on a certain field?

    You may want to take a look at CheckUsernameConflict function in web/staff/app/cls_ps_staff.inc.php. The function ... Read More
    Posted by Juan Manuel
    2015-02-03

    In case someone need to bypass the confirmation step: Modify the /web/form/app/cls_ps_******.inc.php file like this:

    //------------------------------------------------------
    // Reg Page2 ... Read More
    Posted by Tom
    2015-02-13

    Thank you for your contribution!
    Posted by Juan Manuel
    2015-01-27

    Is it possible to bypass the "confirm information" (page 2) on the form? It's not good to have extra steps when using the form on a landing page.

    By the way, your work is amazing, thanks so much for ... Read More
    Posted by Tom
    2015-01-29

    >Is it possible to bypass the "confirm information" (page 2) on the form

    There isn't any convenient switch to drop the confirmation page, but certainly it's possible to modify the code that way. ... Read More
    Posted by Simon
    2014-12-22

    Is it possible to add a new 'record' in FormMail,
    just like in the "Lead Follow-Up Database.
    So only a Staff can make an new record and the admin can only delete it.
    I have tried to add "Add New" ... Read More
    Posted by Tom
    2015-01-06

    Hi,

    >Is it possible to add a new 'record' in FormMail,

    It's possible but not implemented as a turnkey solution. You need to read the code and come up with a solution.
    Posted by Stephen
    2014-12-07

    I am trying out your forms
    Posted by Tom
    2014-12-12

    Okay!
    Posted by Carl
    2014-12-02

    Is there a way to add a redirect so when the form is finished and email is sent it redirects back to the initial form page?
    Posted by Tom
    2014-12-12

    >Is there a way to add a redirect so when the form is finished and email is sent it redirects back to the initial form page?

    You can use this javascript to redirect users to the first page.
    ... Read More
    Posted by Any
    2014-11-29

    Nice , Thanks..
    Posted by Tom
    2014-12-04

    You are welcome :)
    Posted by anuradha
    2014-11-20

    can i please know how to validate inputs (before submit to db) for proper telephone number format or how to customise the input with validations?
    Posted by Tom
    2014-12-04

    >can i please know how to validate inputs

    You can find validation examples in /web/codelib/sys/CVField.inc.php, which includes php classes for all the field types used in the script.


    Customization Quick Guide

    Note: Also check out Customization Quick Guide of Address Book Script. Since Form2DB shares the same code base with Address Book Script, it also applies to Form2DB.

    Top
    Making a Field Required or Optional

    You can easily make fields required or optional. For example, to make the tel field (of the Form table) required, follow the step below

    Please follow the steps below *AFTER* you install the script!
     Step 1 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>true,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Done!

    To change it back to "optional", just set "false" like XA_REQUIRED=>false,

    Top
    Changing Size of Input Box

    You can easily change the size of input box in the New/Edit page. For example, to change the size of the input box of the tel field from 24 to 48, follow the step below

    Please follow the steps below *AFTER* you install the script!
     Step 1 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>48,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Done!


    Top
    Resizing Column Size (Field Size)

    Do you need to make the size of a field larger/smaller? The following guide will show you an example for changing the size of a field. In this guide, you change the size of the tel field (of the Form table) from 36 chars to 60 chars.

    Please follow the steps below *AFTER* you install the script!
     Step 1 
    Use phpMyAdmin to change the size of "tel" field of the table, tbl_form to 60 chars.

    If you prefer to use a sql statement, use the following command:
    ALTER TABLE `tbl_form` CHANGE `tel` `tel` VARCHAR( 60 ) DEFAULT NULL;
    
     Step 2 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>60,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),

    Done!

    Top
    Copying a Field

    Do you need another field similar to an exsiting field in the script? If so, the following step-by-step guide will help you. In this guide, you will add a copy of the tel field to the script. Let's call it "tel2."

    Please follow the steps below *AFTER* you install the script!
     Step 1 
    Use phpMyAdmin to create a new field named "tel2" in the table, tbl_form. The attributes of the tel2 field should be exactly the same as the tel field except the field name.

    If you prefer to use a sql statement to create the tel2 field, use the following statement:
    ALTER TABLE `tbl_form` ADD `tel2` VARCHAR( 36 ) NULL AFTER `tel`;
    
     Step 2 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_TEL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    'tel2'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>"Tel2",
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
     Step 3 
    Find the following code in web/staff/tpl.form.detail.inc.php.
    <tr>
    <td class='column_caption'>
    <span class="required"></span>
    <?php echo RSTR_TEL; ?> :
    </td>
    <td class='column_value'>
    <?php echo $hm->Zb( 'rs:def:tel' ); ?>
    </td>
    </tr>
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    <tr>
    <td class='column_caption'>
    <span class="required"></span>
    Tel2 :
    </td>
    <td class='column_value'>
    <?php echo $hm->Zb( 'rs:def:tel2' ); ?>
    </td>
    </tr>
     Step 4 
    Find the following code in web/form/tpl.form.reg_page1.inc.php.
    <tr>
    <td class='column_caption'><span class="required"></span> Tel# : </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:tel'); ?></td>
    </tr>
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    <tr>
    <td class='column_caption'><span class="required"></span>Tel2# : </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:tel2'); ?></td>
    </tr>
     Step 5 
    Find the following code in web/form/tpl.form.reg_page2.inc.php.
    <tr>
    <td class='column_caption'><span class="required"></span> Tel# : </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:tel'); ?></td>
    </tr>
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    <tr>
    <td class='column_caption'><span class="required"></span> Tel2# : </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:tel2'); ?></td>
    </tr>
     Step 6 
    Find the following code in config.email.form.php.
    //---------------------------------------------------------------
    // Email Body Template ( Text Format )
    //---------------------------------------------------------------

    Body=<<<_EOM_
    Name : ##name##
    Email : ##email##
    Tel# : ##tel##
    Subject : ##subject##
    Comments : ##comment##
    _EOM_

    //---------------------------------------------------------------
    // Email Body Template ( HTML Format )
    //---------------------------------------------------------------

    Html=<<<_EOM_
    <html>
    <head>
    <title>Contact Us</title>
    </head>
    <body>
    <table>
    <tr>
    <td align='right'>Name : </td>
    <td align='left'>##name##</td>
    </tr>
    <tr>
    <td align='right'>Email : </td>
    <td align='left'>##email##</td>
    </tr>
    <tr>
    <td align='right'>Tel# : </td>
    <td align='left'>##tel##</td>
    </tr>
    <tr>
    <td align='right'>Subject : </td>
    <td align='left'>##subject##</td>
    </tr>
    <tr>
    <td align='right'>Comments : </td>
    <td align='left'>##comment##</td>
    </tr>
    </table>
    </body>
    </html>
    _EOM_
    Insert the BLUE texts like shown below. (2 locations)
    //---------------------------------------------------------------
    // Email Body Template ( Text Format )
    //---------------------------------------------------------------

    Body=<<<_EOM_
    Name : ##name##
    Email : ##email##
    Tel# : ##tel##
    Tel2# : ##tel2##
    Subject : ##subject##
    Comments : ##comment##
    _EOM_

    //---------------------------------------------------------------
    // Email Body Template ( HTML Format )
    //---------------------------------------------------------------

    Html=<<<_EOM_
    <html>
    <head>
    <title>Contact Us</title>
    </head>
    <body>
    <table>
    <tr>
    <td align='right'>Name : </td>
    <td align='left'>##name##</td>
    </tr>
    <tr>
    <td align='right'>Email : </td>
    <td align='left'>##email##</td>
    </tr>
    <tr>
    <td align='right'>Tel# : </td>
    <td align='left'>##tel##</td>
    </tr>
    <tr>
    <td align='right'>Tel2# : </td>
    <td align='left'>##tel2##</td>
    </tr>

    <tr>
    <td align='right'>Subject : </td>
    <td align='left'>##subject##</td>
    </tr>
    <tr>
    <td align='right'>Comments : </td>
    <td align='left'>##comment##</td>
    </tr>
    </table>
    </body>
    </html>
    _EOM_

    Done!

    Log in the staff area and check the detail page of one of form records. You will see the tel2 field and it's ready to use!
    Optionally, you can add the tel2 field to the Search page.
    To add it as a search criteria, see Adding a Search Criteria.
    To display it in the Search Results table, see Adding a Field to Search Results table.

    Top
    Adding a Search Criteria

    The following steps guide you add a search criteria to the Search page. Let's use the tel2 field you created in the section, "Copying a Field" as an example.

     Step 1 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel2'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>"Tel2",
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Insert the BLUE text (if it's not present) like shown below. (1 location)
    'tel2'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>"Tel2",
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
     Step 2 
    Find the following code in web/staff/tpl.form.search.inc.php.
    <!-- [BEGIN] Main Form -->
    <div id="main_div">

    <?php include( 'include/tpl.form.begin.inc.php' ); ?>

    <?php include( 'include/tpl.body.info.inc.php' ); ?>

    <!-- [BEGIN] Search Criteria -->
    <?php echo $hm->SectBegin( RSTR_SEARCH_CRITERIA ); ?>

    <div style='overflow:auto;'>
    <table width='99%'>
    Insert the BLUE text like shown below. (1 location)
    <!-- [BEGIN] Main Form -->
    <div id="main_div">

    <?php include( 'include/tpl.form.begin.inc.php' ); ?>

    <?php include( 'include/tpl.body.info.inc.php' ); ?>

    <!-- [BEGIN] Search Criteria -->
    <?php echo $hm->SectBegin( RSTR_SEARCH_CRITERIA ); ?>

    <div style='overflow:auto;'>
    <table width='99%'>

    <tr>
    <td align="right">Tel2 : </td>
    <td align="left"><?php echo $hm->Zb( 'sp:def:tel2' ); ?></td>
    <td align="right">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td align="left">&nbsp;</td>
    </tr>


    Done!

    Top
    Adding a Field to Search Results table

    The following instruction explains how to display a field in the Search Results table. We'll use the tel2 field you created in the section, "Copying a Field" as an example.

     Step 1 
    Find the following code in web/codelib/asc/df.fl.form.inc.php.
    'tel2'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>"Tel2",
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
    Insert the BLUE text (if it's not present) like shown below. (1 location)
    'tel2'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>"Tel2",
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)(g_reg_page1)(g_reg_page2)(g_reg_save)',
    ),
     Step 2 
    Find the following code in web/staff/tpl.form.search.inc.php.
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb( 'ob:rs:def:form_id' ); ?> <?php echo RSTR_FORM_ID; ?></th>
    <th><?php include( 'include/tpl.sr.selrec_header.inc.php' ); ?></th>
    <th><?php include( 'include/tpl.sr.edit_btn_header.inc.php' ); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb( 'ob:rs:def:name' ); ?> <?php echo RSTR_NAME; ?></th>
    <th nowrap='true'> <?php echo RSTR_TEL; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    <th><?php echo RSTR_SUBJECT; ?></th>
    </tr>
    Insert the BLUE text like shown below. (1 location)
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb( 'ob:rs:def:form_id' ); ?> <?php echo RSTR_FORM_ID; ?></th>
    <th><?php include( 'include/tpl.sr.selrec_header.inc.php' ); ?></th>
    <th><?php include( 'include/tpl.sr.edit_btn_header.inc.php' ); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb( 'ob:rs:def:name' ); ?> <?php echo RSTR_NAME; ?></th>
    <th nowrap='true'> <?php echo RSTR_TEL; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    <th><?php echo RSTR_SUBJECT; ?></th>
    <th>Tel2</th>
    </tr>
     Step 3 
    Find the following code in web/staff/tpl.form.search.inc.php.
    <?php while( $hm->zb( '@rs:def:begin_table' ) ) { ?>
    <tr>
    <td style='text-align:right;'><?php echo $hm->Zb( 'rs:def:form_id' ); ?></td>
    <?php include( 'include/tpl.sr.id_param.inc.php' ); ?>
    <?php include( 'include/tpl.sr.selrec.inc.php' ); ?>
    <?php include( 'include/tpl.sr.edit_btn.inc.php' ); ?>
    <td style='text-align:center;'><?php echo $hm->Zb( 'rs:def:active' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:name' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:tel' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:email' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:subject' ); ?></td>
    </tr>
    <?php } ?>
    Insert the BLUE text like shown below. (1 location)
    <?php while( $hm->zb( '@rs:def:begin_table' ) ) { ?>
    <tr>
    <td style='text-align:right;'><?php echo $hm->Zb( 'rs:def:form_id' ); ?></td>
    <?php include( 'include/tpl.sr.id_param.inc.php' ); ?>
    <?php include( 'include/tpl.sr.selrec.inc.php' ); ?>
    <?php include( 'include/tpl.sr.edit_btn.inc.php' ); ?>
    <td style='text-align:center;'><?php echo $hm->Zb( 'rs:def:active' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:name' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:tel' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:email' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb( 'rs:def:subject' ); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:tel2'); ?></td>
    </tr>
    <?php } ?>

    Done!