Search »

Configuring the other form pages

This step is very much like the previous. Add the following to the top of your pages. Note that the initFormPage() line doesn't contain any parameters - that's important!

Like before, you'll need to tweak the following for each form page:

  1. The path to the API.class.php file has to be updated for your server.
  2. Change submit_button_name_attribute to the name attribute of your form submit button.
  3. Change next_page.php to the next page in the form sequence. This should be different for each form page.
  4. Again, as before, if your form contains file fields, add one more parameter to the $params array: the last file_data row.
  5. Since generally you don't want people linking directly to the 2nd or 3rd page of your form - you want them to start on page 1 - the "no_sessions_url" parameter to this function lets you protect against this. It checks to see if sessions exist (i.e. were created on the first page of the form) and if not, it redirects the user out to the file specified. This can be an absolute or relative URL.

One Last Thing

On the page BEFORE your "thank you" page you'll want to make one last change. When the user clicks SUBMIT on that page, that's the point at which you'll want the form submission to be marked as complete, or "finalized". Add one additional parameter to the $params array:

So, your code will look something like this: