Dec 27th, 2012, 7:53 PM
Hi,
I am a newbie and tried following the same steps using the external option and api. The direct/post method works great while adding form,but gives the same message when trying to use api
" Form Tools hasn't received a successful test submission yet."
I am trying to run on localhost using XAMPP.
Below is my Thanks.php i.e my thank you page.
I have tried and followed every step possible as given in documentation multiple times, going no where. I am surprised its working when I used
post/direct .
Any suggestions would be of great help to me.
Thanks in advance.
I am a newbie and tried following the same steps using the external option and api. The direct/post method works great while adding form,but gives the same message when trying to use api
" Form Tools hasn't received a successful test submission yet."
I am trying to run on localhost using XAMPP.
Code:
<?php
/**********************************/
//Added for FormTools Testing
require_once("../FormTools/formtools/global/api/api.php");
//$fields = ft_api_init_form_page("", "test");
$fields = ft_api_init_form_page(12, "initialize");
print_r($fields);
$params = array(
"submit_button" => "questionadd",
"next_page" => "Thanks.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Add Question: Add New Question</title>
<link rel="stylesheet" type="text/css" href="css/search_question.css" media="screen" />
<SCRIPT language=JavaScript>
function performSearch()
{
var form1 = document.getElementById('search');
var searchkeyword=form1.elements["searchkeywordfield"].value;
//document.write("searchkeyword=" + searchkeyword);
location='../PerformSearch/PerformSearch.php?searchkeyword=' + searchkeyword ;
//location='../PerformSearch/PerformSearch.php';
}
</script>
</head>
<body>
<div id="questionInputDiv">
<form id="search" name="search" action="Thanks.php" method="post">
<!-- <form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> -->
<!-- <form action="http://localhost/FormTools/formtools/process.php" method="post">
<input type="hidden" name="form_tools_form_id" value="4" />-->
<span id="searchkeyword" class="size3">
<b>Search:</b> <input type="text" name="searchkeywordfield" value="" size="40" />
<input id="searchkeywordbutton" type="button" value="Search" onclick="performSearch();"/>
</span>
<span id="questioncontent">
<font style="color: red">
<br><br>
</font>
<br><br>
<br>
<b>Please Enter Question:</b>
<textarea name="questioncontentbox" id="questioncontentbox" rows="3" cols="70" style="overflow:auto" ></textarea>
<br><br>
<input name=questionadd id="questionadd" type="submit" value="Add Question" />
</span>
</form>
</div>
<div id="displaySearchResultsDiv">
<span id="displayquestions">
</span>
</div>
</body>
</html>
Below is my Thanks.php i.e my thank you page.
Code:
<?php
require_once("../FormTools/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
print_r($fields);
ft_api_clear_form_sessions();
echo Thanks;
?>
I have tried and followed every step possible as given in documentation multiple times, going no where. I am surprised its working when I used
post/direct .
Any suggestions would be of great help to me.
Thanks in advance.