Probably the easiest and best way to do this, is using the excellent "GBCF-v3 Secure & Accessible Form Script", which you can get here: http://green-beast.com/gbcf-v3/
Setting it up in PivotX will take about 10 minutes. A bit longer, if you want to tweak the CSS more. We're going to do this in two steps: First, set up the script itself, and then we're going to add a page in PivotX to show the form inside our own template/layout.
First some general setup stuff, for the form script:
- Download the GBCF-v3 scripts from http://green-beast.com/gbcf-v3/
- Extract the file, and upload the 'gbcf-v3' folder to the root of your site, where the pivot/ folder is also.
- Follow the instructions in the supplied readme.txt with regard to configuring the config.php file. Do this up to and including step 8. You don't have to do step 9!
- The script is quite extensive. You'll probably want to set a lot of the options in sections '7' and '8' to "no".
- By now the form should be working.. Go to yourdomain.com/gbcf-v3/test-form.php to check if everything is OK.
Now we're going to add this form to one of your PivotX pages:
- Edit the template with the head section that's used for pages. This might be something like page_template.tpl, or if you're using includes, it might be called _sub_header.tpl. Anyways, before the </head> tag, add this:
- Code: Select all
[[ if $pagetype=="page" ]]
<link rel="stylesheet" type="text/css" href="[[log_dir]]gbcf-v3/files/themes/gray.css" media="screen" />
<!--[if IE]>
<script type="text/javascript" src="[[log_dir]]gbcf-v3/files/focus.js"></script>
<![endif]-->
[[ /if ]]
- In PivotX, add a new page.. Select the right template, and place the following in the 'Introduction' field:
- Code: Select all
[[ php ]]chdir("../gbcf-v3/");include_once("form.php");[[ /php ]]
- View the page on your website, and verify that everyting works as it should.