The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WordPress Integration
I'm having some trouble getting my multi-page form to continue onward. First let me point out that I'm using this within I've set up different templates that contain the form code but also can be populated with other content via the back-end. Not sure if this is related to the problem here.

What I've noticed is that when I use the form action echo $_SERVER["PHP_SELF"]...the form always points to

So when I hit submit, the form just tries to go to that URL instead of what I specify in the params which would be another page in the WordPress framework that I've set up in a similar manner. I could just use the file name for the action I suppose...but I wanted to do this the correct way :-). Any ideas?
I've resorted to not using the form action $_SERVER["PHP_SELF"] in WordPress and I'm instead using the relative path of the url, so for example if the first page is then I'd use /form1 for the first form page, /form2 (or whatever it's called) for the second and so on, so that it submits to itself and can continue the chain.

I'd really like to know why WordPress resolves PHP_SELF as index; but that's not something that I'm going to spend a lot of time on.

Yes, PHP_SELF usually includes the file name as well. The $_SERVER variable is invaluable for extracting certain information, but it's notoriously inconsistent across servers. This is one of PHP's really AWFUL features: inconsistent implementation of global variables like this. Unlike other keys like REQUEST_URI, PHP_SELF is defined on virtually all servers so I decided to rely on it in the Form Tools code.

Glad you found a solution, at least.

- Ben
I am having this same problem in wordpress. The page submits to the index page when you use echo $_SERVER["PHP_SELF"].

I will use the file name to solve the problem, but im not sure which file name to use? Where should I submit the form to?

Thank you.
Hey st8,

It'll be the same page you're currently on: so /my-page or whatever.

- Ben
(Nov 7th, 2009, 10:59 AM)Ben Wrote: Hey st8,

It'll be the same page you're currently on: so /my-page or whatever.

- Ben

Ben, I've had a working FT form for over 2 years, but I also now need to place my external form inside a wordpress theme to match the clients new website design and can't seem to get it to work as expected. I am calling the page from within the a basic wordpress theme template via php:

<?php include '/path/to/register/index.php'; ?>

I just upgraded Form Tools to v2.2.5. API v1.1.4. Your solution gets the form to proceed to the next page, but the users input data is not being saved, all fields are blank on page 2 (Review). In the database, all the values are NULL. When I go back, the form is also blank. I also tried adding this to my config.php file:

$g_api_session_type = "database";
$g_api_session_timeout = "3600";

...with no luck. Also put the php api call on-top/first directly in the wordpress template. Tried disabling JS in my browser, nope.

My multi-form is Step 1 (Register Form), Step 2 (Review), Step 3 (PayPal), Step 4 (Confirmation).

I've been working on this for 5 days and really need to get this form to work within a wordpress template.
having this same problem in my site and

Forum Jump:

Users browsing this thread: 1 Guest(s)