Online Chat
 Call Us: 
Browse Submit a Ticket
Advanced Search
Rss Categories

How to reconfigure Form Processor Pro v4 form with Form Processor Pro v5?

Author: Antony Corsten Reference Number: AA-00250 Views: 9774 Last Updated: 08/11/2009 07:56 AM 0 Rating/ Voters

Please follow this guide to reconfigure your forms from Form Processor Pro v4 to Form Processor Pro v5

Step 1 (Initial Configuration Script):
First of all you need to finish initial configuration script. Go to where 'fpp' is place where Form Processor Pro is located. In right upper corner press 'login' enter password admin and finish the script.

Step 2 (Pages):
You need to add <base href="..."> tag directly after <head> tag in your from page. This line will prevent troubles with images, css and urls that can appear after page processing.
If your page has real URL you need to add to page:

<base href="">

Second you need to change <form action="..."> path to index.php of Form Processor Pro v5, instead of previous <form action...> you need to put:
<form method="post" action="../fpp/index.php" enctype="multipart/form-data">

where '../fpp/index.php' is relative path to Form Processor Pro, it can also be URL to this index.php
<form method="post" action="" enctype="multipart/form-data">

Put <!-- FPP_ERROR --> into your page, to show there error about incorrect input, you may insert it in any part of your where you want user to see error.
You have to do this (action and error) for all pages of the form.

Then you need to name your form. As all configurations will be stored in one file, Form Processor Pro need to differ them from each other, to do this you need to add this line just under <form action...>:
<input type="hidden" name="fpp_form" value="form_name">

where 'form_name' will be name of your form. This line must be added only to the first page of your form.

---optional CAPTCHA---
If you used CAPTCHA in you forms, there ought to be such lines in your page:
<img src="../formprocessorpro.php?captcha">
<input type="text" name="r_captcha" value="" />

You should change first line to:
<img src="../fpp/captcha.img.php">

where '../fpp/captcha.img.php' is path to captcha.img.php in your Form Processor Pro folder Also remember name of the next input field, as you later should use it in configuration.

Step 3 (Templates):
In Form Processor Pro v5 you need to use delimiters {# and #} instead of [ and ], so you need to open your templates in any plain text editor and change all '[' to '{#' and ']' to '#}' for example your email template should look like this:
To: "{#firstname#}" <{#email#}>
From: "My Company" <>
Subject: Thank you

Dear {#firstname#},
Here is information that you had filled in our form:
Name: {#name#}
Company Name: {#company-name#}
Contact Email: {#email#}

Step 4 (config.php):
You need to open config.php that located in main folder of Form Processor Pro v5 installation in any plain text editor, and add to the end of this file such line: [form_name] this will be the mark where form description is started.
You can use your data from form.cfg, but it should be modified. All lines that begin with '_error_path=' should be deleted, as errors now showed on the page where incorrect values were inputted.
First line under form name should be:
page = ../path/formpage.html

Where formpage.html - is first page of your form, path should be relative to config.php, or you can use URL of the page:

Paste you code from form.cfg into config.php under first line, there will be lines like this:

You need to change '_browser_out=', '_browser_out1=' and so on to 'page = ' without any numbers.
All '_send_email#=' should be changed to 'email = ' , '_out_file=' should be changed to 'log_file = '
email = ../path/email.txt
email = ../path/email-autorespond.txt
log_file = ../path/log.txt

All paths must be relative to config.php or it can be URLs to needed files (except log files).

All validators now should be written into config.php in form description. Here is most popular and most useful of them:
Check if field was filled:
required_fields = fieldname (Field Name), field2 (Second Field Name)

in brackets are located names that will be used in error generating, so user will see 'Field "Field Name" is required to be filled'

Check if entered data is valid email address:
email_fields = email (Email Address)

---optional CAPTCHA---
To activate CAPTCHA in your form, add line
captcha_fields = r_captcha (Value from CAPTCHA)

where 'r_captcha' is name of field, where user should input value from CAPTCHA