Allibsus    
main page | buy now | interactive tour | demo | support | contact us
 



main page
buy now
tour
demo
support
contact us



Online Manual / Setting Up Your Forms / Multiple Page Forms

You would first need to specify the location of the templates. Then you can proceed to creating the form pages. All <output>'s will be converted in the forms. Let's show an example of setting up a simple job application.

Let's start with the configuration file. Let's save it as config.txt.

# This is an example of a configuration file that can be used with a multi page form.
# These are the required fields for page 1.

required page="1" value="Name, E-mail Address, Age"
required page="2" value="Salary, Hours Per Week, Available Days,
Convicted Of A Crime"
required page="3" value="Work Experience"

# We want to use sendMail in this example.
sendMail value="1"

# The template of all my form pages.
templatePage page="1" value="/server/path/to/templatePage1.html"
templatePage page="2" value="/server/path/to/templatePage2.html"
templatePage page="3" value="/server/path/to/templatePage3.html"

# First send the form results to myself.
sendMsg page="3" to="Joey Susbilla <contact@allibsus.com>" from="allibsus <allibsus@allibsus.com>" replyTo="allibsus <allibsus@allibsus.com>" subject="Submission to your form from [output name='Name']" template="/home/allibsus/public_html/mailpro/templates/recipient.html" contentType="text/html"

# Finally, we can send an auto response to the user.
sendMsg page="3" to="[output name='E-mail Address']" from="allibsus <allibsus@allibsus.com>" replyTo="allibsus <allibsus@allibsus.com>" subject="Thank you for submitting to our form [output name='Name']!" template="/home/allibsus/public_html/mailpro/templates/mailpro-php-response.html" contentType="text/html"

Now let's create our first page and save it as templatePage1.html.

1

2


3





4





















5



6

<form method="POST" action="http://allibsus.com/mailpro/mailpro.php?config.txt;currentPage=1;nextPage=2">
<output type="results">
<input type="hidden" name="[name]" value="[value]">
</output>
<output type="error">
<p align="left">
Error:<br>
[error]
</p>
</output>
<table border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td>Name:</td>
    <td><input type="text" name="Name" value="[output name='Name']">
  </tr>
  <tr>
    <td>E-mail Address:</td>
    <td><input type="text" name="E-mail Address" value="[output name='E-mail Address']">
  </tr>
  <tr>
    <td>Age:</td>
    <td><select name="Age">
    <option value="">&nbsp;</option>
    <option value="16-18">16-20</option>
    <option value="19-25">21-25</option>
    <option value="26-40">26-40</option>
    <option value="41-">41-</option>
    </select>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="_nextPage" value="Next Page">
    <input type="reset" value="Reset">

    </td>
</table>
</form>

  1. This line tells browsers where the form data will be sent to. So we will need to set the action to the URL location of the allibsus mail pro php program. Notice the multi-config.txt after mailpro.php? that is the name of the configuration file stored in the home directory for templates and configuration files. See Setting home directory for templates and configuration files . Also, notice the currentPage=1 this tells the script that the current page is the page specified in templatePage1. And nextPage=2 tells the script to proceed to templatePage2. It is important that you specify both currentPage and nextPage on the first page of your multi page form.
  2. We need to carry on form results so we specify the form results output type.
  3. If an error occurs it will display here.
  4. We add the form fields 'Name, E-mail Address, Age'. You must end <option> with </option> in a <select> list so that the script knows which value you've selected.
  5. We add a submit button that we name '_nextPage'. We need to name the button '_nextPage' to tell the script to go to the next page.
  6. This line marks the end of the form.

Now let's create the second page and save it as templatePage2.html.

1

2


3





4





























5




6

<form method="POST" action="http://allibsus.com/mailpro/mailpro.php?config.txt;previousPage=1;currentPage=2;nextPage=3">
<output type="results" exclude="Available Days">
<input type="hidden" name="[name]" value="[value]">
</output>
<output type="error">
<p align="left">
Error:<br>
[error]
</p>
</output>
<table border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td>Salary Desired:</td>
    <td><input type="text" name="Salary" value="[output name='Salary']">
  </tr>
  <tr>
    <td>How many hours per week can you work?</td>
    <td><input type="text" name="Hours Per Week" value="[output name='Hours Per Week']">
  </tr>
  <tr>
    <td valign="top">Which days are you available for work?</td>
    <td>
    <input type="checkbox" name="Available Days[]" value="Sunday"> Sunday<br>
    <input type="checkbox" name="Available Days[]" value="Monday"> Monday<br>
    <input type="checkbox" name="Available Days[]" value="Tuesday"> Tuesday<br>
    <input type="checkbox" name="Available Days[]" value="Wednesday"> Wednesday<br>
    <input type="checkbox" name="Available Days[]" value="Thursday"> Thursday<br>
    <input type="checkbox" name="Available Days[]" value="Friday"> Friday<br>
    <input type="checkbox" name="Available Days[]" value="Saturday"> Saturday<br>
    </td>
  </tr>
  <tr>
    <td valign="top">Have you ever been convicted of a crime?</td>
    <td>
    <input type="radio" name="Convicted Of A Crime" value="Yes"> Yes<br>
    <input type="radio" name="Convicted Of A Crime" value="No"> No<br>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <input type="submit" name="_previousPage" value="Previous Page">
    <input type="submit" name="_nextPage" value="Next Page">
    <input type="reset" value="Reset">

    </td>
</table>
</form>

  1. This line tells browsers where the form data will be sent to. So we will need to set the action to the URL location of the allibsus mail pro php program. Notice the multi-config.txt after mailpro.php? that is the name of the configuration file stored in the home directory for templates and configuration files. See Setting home directory for templates and configuration files. Notice that we specify previousPage=1 this tells the script that previous page is templagePage1. Also, notice the currentPage=2 this tells the script that the current page is the page specified in templatePage2. And nextPage=3 tells the script to proceed to templatePage3.
  2. We need to carry on form results so we specify the form results output type. It is required that you exclude fields that have multiple values such as check boxes or menu lists.
  3. If an error occurs it will display here.
  4. We add the form fields 'Salary, Hours Per Week, Available Days, Convicted Of A Crime'.
  5. We add a submit button that we name '_previousPage'. We need to name the button '_previousPage' to tell the script to go to the previous page.
  6. This line marks the end of the form.

Finally, let's create the last page and save it as templatePage3.html.

1

2


3





4







5



6

<form method="POST" action="http://allibsus.com/mailpro/mailpro.php?config.txt;previousPage=2;currentPage=3">
<output type="results">
<input type="hidden" name="[name]" value="[value]">
</output>
<output type="error">
<p align="left">
Error:<br>
[error]
</p>
</output>
<table border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td>Work Experience:</td>
    <td><textarea name="Work Experience">[output name='Work Experience']</textarea></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <input type="submit" name="_previousPage" value="Previous Page">
    <input type="submit" value="Submit">
    <input type="reset" value="Reset">

    </td>
</table>
</form>

  1. This line tells browsers where the form data will be sent to. So we will need to set the action to the URL location of the allibsus mail pro php program. Notice the config.txt after mailpro.php? that is the name of the configuration file stored in the home directory for templates and configuration files. See Setting home directory for templates and configuration files. Notice that we specify previousPage=2 this tells the script that previous page is templagePage2. Also, notice the currentPage=3 this tells the script that the current page is the page specified in templatePage3. Since we did not specify nextPage here the script will proceed to the confirmation page.
  2. We need to carry on form results so we specify the form results output type. It is required that you exclude fields that have multiple values such as check boxes or menu lists.
  3. If an error occurs it will display here.
  4. We add the form fields 'Work Experience'.
  5. Since this is the last page of our multi page form, we add a submit button without a name to tell the script to proceed to the confirmation page.
  6. This line marks the end of the form.

Finally, to view this form in a web browser we would go to:

http://example.com/path/to/mailpro.php?config.txt;currentPage=1

So please make note of this when you create links to your form pages.