Oct 13th, 2012, 12:24 PM
Could someone please offer some advice as I just can't do a test submission using the API.
I am using XAMPP as my server on a PC running Windows Vista. During the install, the only error I got was about MYSQL (MySQL client version: mysqlnd 5.0.8-dev), but I checked using phpMyAdmin and the Server version is 5.5.16 so I assumed it would be ok to ignore the error.
As per the instructions, I have the following at the top of my page:
<?php
require_once("forms/formtools/global/api/api.php");
$fields = ft_api_init_form_page(11, "initialize");
$params = array(
"submit_button" => "submit",
"next_page" => "thank-you.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
My form has the following:
<form name="testForm" id="testForm" action="<?php echo $_SERVER["PHP_SELF"]?>" method="post">
My thank-you page has the following at the top of the page:
<?php
require_once("forms/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
When I try to do a test submission, I get the following error:
Error Type: User
Error Code: #100 — Learn more about this error.
The error say I could be sending an incorrect form ID so I checked the admin panel and it appears the ID is correct
ID Form Form Type Status Submissions
11 testForm External Incomplete COMPLETE
If I use the Direct method by pointing the form to Form Tools it works ok but I need to use the API so I can do server-side validation for various fields.
Could someone please help.
I am using XAMPP as my server on a PC running Windows Vista. During the install, the only error I got was about MYSQL (MySQL client version: mysqlnd 5.0.8-dev), but I checked using phpMyAdmin and the Server version is 5.5.16 so I assumed it would be ok to ignore the error.
As per the instructions, I have the following at the top of my page:
<?php
require_once("forms/formtools/global/api/api.php");
$fields = ft_api_init_form_page(11, "initialize");
$params = array(
"submit_button" => "submit",
"next_page" => "thank-you.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
My form has the following:
<form name="testForm" id="testForm" action="<?php echo $_SERVER["PHP_SELF"]?>" method="post">
My thank-you page has the following at the top of the page:
<?php
require_once("forms/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
When I try to do a test submission, I get the following error:
Error Type: User
Error Code: #100 — Learn more about this error.
The error say I could be sending an incorrect form ID so I checked the admin panel and it appears the ID is correct
ID Form Form Type Status Submissions
11 testForm External Incomplete COMPLETE
If I use the Direct method by pointing the form to Form Tools it works ok but I need to use the API so I can do server-side validation for various fields.
Could someone please help.