Feb 23rd, 2012, 5:03 AM
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
Also added the code:
3. Created a Thank you page and placed the code
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 (http://docs.formtools.org/tutorials/api_...page=step3), they are saying:
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.
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
Code:
<?php
require_once("replaced/with/my/path/to/form_tools/global/api/api.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
);
ft_api_process_form($params);
?>
Code:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
3. Created a Thank you page and placed the code
Code:
<?php
require_once("replaced/with/my/path/to/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
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 (http://docs.formtools.org/tutorials/api_...page=step3), 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.