Master Form PHP V3
 
 

[home]

User Manual

General   Control Panel   Form Features
   
 

Quick Start

The quick start bypasses the Master Form .PHP control panel. The form submission information will be stored in the default MySQL database table.

(Later, if you want required fields or have email sent or other custom things, a table setup will need to be created in the Master Form .PHP control panel.)

The quick start is two steps.

Step 1. The confirmation/thank-you page

It might be counter-intuitive, but do the confirmation/thank-you page first.

The confirmation/thank-you page needs to be a PHP web page. In the page source code, insert this PHP code:

<?php
$InstallationDirectory = "/installed";
include($_SERVER["DOCUMENT_ROOT"]."$InstallationDirectory/MasterFormInclude.php");
?>

Insert the PHP code in the head area of the web page source code, if you can. Otherwise, as high in the body area as is feasible. Any customization related to the form submission can occur only below the point where the line is inserted.

Put the confirmation/thank-you page on your server. Make a note of its URL. (The URL will be needed at the end of Step 2.)

Step 2. The form

The web page with the form can be any standard type of web page – .html, .php, .asp, etc. PHP is not required.

Create your form, if you don't already have one.

Paste the form's source code into a text processor and do two things:

  1. Replace the <form...> tag with this code:

    <form 
       id="myform" 
       method="post" 
       enctype="multipart/form-data" 
       action="http://example.com/formpage.php">
    

    The id value may be changed.

    The method value may be changed to "get". For most implementations, "post" is preferred.

    The enctype attribute may be optional. If the form has a file upload field, the enctype attribute is required.

    Make the action value the URL of the web page with the form.

    Note: If the web page with the form is a PHP web page, the action URL can be inserted automatically with:

    action="<?php echo($_SERVER['PHP_SELF']); ?>"
    
     
  2. Below the form code (below the cancel </form> tag), insert this JavaScript:

    <script type="text/javascript">
    var formTagID = "myform";
    var confirmationPage = "http://example.com/confirmation.php";
    document.getElementById(formTagID).action=confirmationPage;
    </script>
    

    If the form's id value is different than id="myform", change the formTagID value in the above JavaScript accordingly.

    Replace the conformationPage value in the above JavaScript with the URL of the conformation/thank-you page set up in Step 1.

Put the web page with the form on your server.

Quick Start is now complete. The form is ready to use.

[home]

Master Form PHP V3, version 3.0
Copyright 2010, 2011 Bontrager Connection, LLC
Copyright 2011-2013, 2015, 2017, 2020 Will Bontrager Software LLC