View Full Version : GentleSource form mail

11-29-2010, 06:43 PM


I really like the possibilities of this form but am struggling to get it working within an existing html page as I'm not a great php person. I have customised the template it talks about and you can access it here:


It sort of describes that it can be used as follows:

You can run the script as stand-alone and customize the layout using the HTML template. If that is the case, you can skip this chapter.
You can include the script in other PHP files so that it fits into an existing website and matches the layout. Here is what you do:
Step 1

You can use the PHP statement include to include the script at the very top (the first line of the file, above every other character, with no character in front of it) of the file:
<?php include 'index.php'; ?>
Step 2

Go to the place in the file where you want the form to appear. Add following line of code:
<?php echo $f6l_output; ?>
Step 3

It is important that you delete this line of code from the file index.php. Otherwise the form will appear on top of your page. Look for this line at the bottom of the file index.php:
echo $f6l_output;
You can also change it into a comment by adding two slashes in front of the line, like so:
//echo $f6l_output;

Step 4

Unless the file where you're including the script resides in the same folder as the index.php, you'll need to change the path to the script in the variable $script_root in index.php.
Step 5

Since you are including the script, you probably won't need the HTML head structure. Just strip it from the HTML template form.tpl.html and leave everything between <body> and </body> intact.

Anyone used it and had success or can any php savvy people see imediately what I should do?


11-29-2010, 07:32 PM

It's OK, sussed it.

Php includes and naming the page .php were some of the problems