2nd Step: Configuring the form

Top  Previous  Next

We put <!-- FPP_ERROR --> tag to the form's HTML in a place where we'd like to display error messages.

Now we need to point our form to be processed with Form Processor Pro. We do this by editing FORM tag's ACTION attribute to refer to the URL where Form Processor Pro resides. You can use either relative or absolute path. We need to set METHOD attribute as POST as well. And finally set ENCTYPE as MULTIPART/FORM-DATA.

Form tag before:

<form name="form1" method="post" action="">

Form tag after required corrections:

<form name="form1" method="post" action="http://www.mydomain.com/fpp/index.php" enctype="multipart/form-data">

If you use relative path in the action parameter and do not use "Base href" tag, every page after first one must have action="index.php" parameter:

<form name="form1" method="post" action="index.php">

That's all for the FORM tag. Now we need to give a unique name to our form, let's name it “contact_form”. We can do this by inserting HIDDEN field just after the FORM tag with the name “fpp_form” and value “contact_form”.

Like this:

<input name="fpp_form" type="hidden" value="contact_form">

 

Note:
In form names you can use only letters, numbers, underscore and dash characters.

Corrected HTML Code with highlighted changes:

 

<html>

<head>

<title>My Contact Form</title>

</head>

<body>

<h3>My Contact Form</h3>

<p><!-- FPP_ERROR --></p>

<p>* - required fields</p>

<form name="form1" method="post" action="http://www.mydomain.com/fpp/index.php" enctype="multipart/form-data">

<input name="fpp_form" type="hidden" value="contact_form">

<table width="300" border="0">

  <tr>

    <td><div align="right">* Full Name:</div></td>

    <td><input type="text" name="name"></td>

  </tr>

  <tr>

    <td><div align="right">* Email:</div></td>

    <td><input type="text" name="email"></td>

  </tr>

  <tr>

    <td><div align="right">Phone:</div></td>

    <td><input type="text" name="phone"></td>

  </tr>

  <tr>

    <td><div align="right">* Subject</div></td>

    <td><input type="text" name="subject"></td>

  </tr>

  <tr>

    <td valign="top"><div align="right">Comment:</div></td>

    <td><textarea name="comment" rows="5"></textarea></td>

  </tr>

  <tr>

    <td valign="top">&nbsp;</td>

    <td><input type="submit" name="Submit" value="Submit">

      <input type="reset" name="Reset" value="Reset"></td>

  </tr>

</table>

</form>

</body>

</html>

 

 

Note:
Please, specify absolute paths in all links, images, path of the action parameter, etc. on your form pages. Otherwise, all relative paths would be relative to Form Processor Pro, but NOT to the page of your web-site. Or you may use HTML tag <BASE> to specify base URL:

<BASE HREF="URL_TO_PAGE">

If you have more than one form page, repeat this step few times. It's not necessary to add hidden field to pages other than first.

Form saved as: contact.html