Jun 12th, 2011, 11:52 PM
(This post was last modified: Jun 13th, 2011, 11:27 PM by hellothere.)
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:
Page 2: Review
Page 3: Thank you
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
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