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
Please help with initial install....
I am having so much trouble getting the test submission to work. I am trying to use a form that I created from a URL. As per the instructions, here is what I did:

1. I followed the steps for creating an API based single page form which uses my own form.
2. I copied the following code to the top of myform.php
$fields = ft_api_init_form_page("", "test");
$params = array(
  "submit_button" => "submit_button_name_attribute",
  "next_page" => "thanks.php",
  "form_data" => $_POST,
  "file_data" => $_FILES,
  "finalize" => true
Also added the code:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">

3. Created a Thank you page and placed the code
$fields = ft_api_init_form_page();

4. Then I went to my website and submitted the form using myform.php. But nothing happened... no data, no message, nothing???? Am I misssing some steps??

Here is my confusion: in the Test submission page (, they are saying:
Quote:Log into Form Tools (as the administrator) and on the Forms page, click on "Add Form". Continue to step 3 and click on the second "Code" option. There, it will have generated a line of PHP which looks like this (X will be your form number):

When I do that, I end up creating another page same as before. And I am bit confused about what they mean when they say "second code option". What is missing here. Please help.
Hi rpacdn,

Sorry you're having trouble!

You should only have to click on the "Add Form" button once. Once you've started adding in a form through the Form Tools insterface, just click the Edit link on the forms page to finish setting up that form. Just delete all unneeded incomplete forms - and make sure you're working with the form ID of the one that's left.

Quote:When I do that, I end up creating another page same as before. And I am bit confused about what they mean when they say "second code option". What is missing here. Please help.

After you click "Add Form" (for the first time), you'll be presented with two buttons: one for "Direct / POST" forms and one for "Code / API" forms. This is just something you select once when starting to configure your form. When you click edit, you won't see that step.

What other problems are you encountering?

- Ben
(Feb 24th, 2012, 2:58 PM)Ben Wrote: What other problems are you encountering?

Hi Ben,

When I click "Add Form", I am presented with two options "Internal" or "External". I chose External. Then I chose "Code/API".
The I gave it a Form name, chose Single page and pointed to my form already online at my website. I chose "public" and proceeded to the next step, where I was taken to the "Test Submission" page. I selected the "Adding a single-page form with the API" option and pasted that code in to my online form (with of course the required edits). Then I went to my form and submitted the form with data and came back to Formtools and clicked on "Refresh Page". But I got the message "Form Tools hasn't received a successful test submission yet"!!

In the Forms tab, I see the form that I just created, but for status, it says "Incomplete"

So I am not sure if I missed any step? Let me know if you need any screen shot or other details to debug the problem.

Thank you for your time.

Hi rpacdn,

If you ever get that message ("hasn't received a successful submission yet"), it means just that: for whatever reason, the POST request containing your form submission + form ID hasn't been submitted to Form Tools via the API. This is usually because the form ID is invalid or because you didn't include a "finalize" => true key-pair value on the page before your "thankyou" page.

Which of the tutorials are you following, btw?

But I won't fib: API forms are fiddly. There's a lot of steps which you have to carefully follow - it's easy to miss something. That was kind of my thinking in writing the Form Builder module, to simplify the whole form generation process.

Keep looking at it & if you're really stuck, email me at and I could take a look at your form directly.

Good luck!

- Ben
Hi rpacdn,

Sorry for the wait, and thanks for sending me your form.

With HTML, image submit buttons actually work differently from normal submit buttons. They send different data via the POST request, so the API code isn't being called to submit your form data.

Try this, in your form, add a hidden field:

[html]<input type="hidden" name="submit_page" value="1" />[/html]

Then, change your $params var at the top of the page to this:

PHP Code:
$params = array(
"submit_button" => "submit_page",
"next_page" => "/forms/ft_thankyou_v1.0.php",
"form_data" => $_GET,
"file_data" => $_FILES
"finalize" => true

That should tie in your form to the API properly. Let me know if you have any trouble!

- Ben
Hi Ben,

Thank you for looking in to the issue. But unfortunately, that did not solve the problem either. I tried two things:
1. created the hidden field and changed my PHP code and tried the form, but got the same error.
2. Then I also changed my submit button to a regular submit button without any image and tried submitting a form again, but nothing.

In both cases, obviously the API didn't get the submission. But I also noticed that the page was not getting forwarded to the thank you page. When I click the Submit button, the form would simply refresh itself (because it is pointing to itself) and clear the data that was entered.

Do you have a sample working form that I can use to test or is there anything else that you can think of that might be causing this problem. Meanwhile, I will try to create a simplified form without all the bells and whistles and see if that works.

Thank you.

Forum Jump:

Users browsing this thread: 1 Guest(s)