FORUMS


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
error 101 [solved]
#1
solved, I posted the answer in the comment below...

Hi guys n gals,

semi novice here.
I installed the formtools, along with a demo ("petition") form from formtools.

I got the form to work in test mode, and managed to set up the form in the admin section properly (or at least it shows up as "Online" in the admin.

But I keep getting an error 101:
http://docs.formtools.org/api/index.php?..._codes#101

Here's my current code, form ID is 1 (assuming it's the same form ID from the admin table). Here's my code:

Page 1 of the form:
Code:
<?php
require_once("formtools/global/api/api.php");
/*$fields = ft_api_init_form_page("", "test");*/
/*$fields = ft_api_init_form_page(2);*/
/*$fields = ft_api_init_form_page(1, "initialize");*/
$fields = ft_api_init_form_page(1);
$params = array(
  "submit_button" => "continue_button",
  "next_page" => "review.php",
  "form_data" => $_POST
    );
ft_api_process_form($params);
print_r($fields);
?>

Page 2: Review
Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array(
  "submit_button" => "continue_button",
  "next_page" => "thanks.php",
  "form_data" => $_POST,
    "finalize" => true
    );
ft_api_process_form($params);
print_r($fields);
?>

Page 3: Thank you


Code:
<?php
require_once("formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
print_r($fields);
?>


Is it something to do with the form ID? The doc says the paramaters need to be removed, not sure if I did this correctly.

Who can spot what I'm doing wrong?!
THANK YOU FOR LOOKING

felipe
Reply
#2
After some tinkering, I figured it out:
the index page required a Form ID for the "$fields = ft_api_init_form_page" function.
the review page cannot take a form ID for the "$fields = ft_api_init_form_page" function.
the confirmation page required a form ID for the "$fields = ft_api_init_form_page" function.
the confirmation page cannot take a form ID for the ft_api_clear_form_sessions" function.

Hope that helps somebody, took me about 4 hours tinkering back and forth, same 101 error. On to the next head scratcher....
Reply
#3
Hello there,

Sorry you had so much trouble! I'm actually just working on a new debugging API function to output various information about the current form data, + some additional functionality like clearing sessions. Hopefully this, added to your toolkit, will make future form integrations less painful...!

- Ben
Reply
#4
(Jun 14th, 2011, 1:16 AM)Ben Wrote: Hello there,

Sorry you had so much trouble! I'm actually just working on a new debugging API function to output various information about the current form data, + some additional functionality like clearing sessions. Hopefully this, added to your toolkit, will make future form integrations less painful...!

- Ben

Ben,
I'm very impressed with form tools so far. If a total noob like me can get it running, that means your documentation is fantastic. Im super excited to tinker with this software, the learning curve has been steep but very rewarding. For someone who has wanted to learn how to program for a while, I think Ive found the tool that is useful and rewarding enough to keep me committed to trying to figure out how to get it to work. So yeah thanks to you and all the developers, great piece of software!
Felipe

Reply
#5
Thanks, Felipe!

Yeah, the documentation isn't bad, but I've never been happy about the API! It's still a little too complicated to get going... but I do have plans to simplify it. Ah to have more time...! Smile

- Ben
Reply
#6
Form tools that have data with installation among the forum arts they have documents with the extensions on it. An error can be solved with the factors that can be present by assignment writing services they can be solved among the formats to be read with some tools to take the information.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)