Aug 18th, 2012, 6:10 AM
(This post was last modified: Aug 19th, 2012, 3:20 AM by ClaudiaUSA.)
I am a grateful user of formtools.org. Thank you for the great tool. So far I am using external forms with direct command by pointing my form to form tools. I would love to switch to the api-method, but I can't figure out the simplest thing. My form doesn't call thankyou.php. My form submits the data and turns into a blank page after. The session is never closed.
Can anyone help me?
Here is my form :
<html>
<body>
<?php
require_once("xxx/formtools/global/api/api.php");
$fields = ft_api_init_form_page(28);
$params = array(
"submit_button" => "submitbutton",
"next_page" => thankyou.php,
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
Student's First Name<input type=text name=AddChildFirstName id=field_1 size='40'>
<br>
Grade / Room<select name=AddChildClassRoom id=field_2><option value=''></option><option value="KA">KA</option><option value="KB">KB</option><option value="1A">1A</option><option value="1B">1B</option><option value="2A">2A</option><option value="2B">2B</option><option value="3A">3A</option><option value="3B">3B</option><option value="4A">4A</option><option value="4B">4B</option><option value="5A">5A</option><option value="5B">5B</option><option value="6A">6A</option><option value="6B">6B</option><option value="7A">7A</option><option value="7B">7B</option><option value="8A">8A</option></select>
<br>
Family Email<input type=text name=AddChildEmail id=field_3 size='40'>
<input id="saveForm" type="submit" value="Submit" name="submitbutton" />
</form>
</body>
</html>
and that is my thank you.php file in the same directory as the main form:
<html>
<body>
<?php
require_once("xx/formtools/global/api/api.php");
$fields = ft_api_init_form_page(28);
ft_api_clear_form_sessions();
?>
This is the thank you page
</body>
</html>
THanks for you help!
Can anyone help me?
Here is my form :
<html>
<body>
<?php
require_once("xxx/formtools/global/api/api.php");
$fields = ft_api_init_form_page(28);
$params = array(
"submit_button" => "submitbutton",
"next_page" => thankyou.php,
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST">
Student's First Name<input type=text name=AddChildFirstName id=field_1 size='40'>
<br>
Grade / Room<select name=AddChildClassRoom id=field_2><option value=''></option><option value="KA">KA</option><option value="KB">KB</option><option value="1A">1A</option><option value="1B">1B</option><option value="2A">2A</option><option value="2B">2B</option><option value="3A">3A</option><option value="3B">3B</option><option value="4A">4A</option><option value="4B">4B</option><option value="5A">5A</option><option value="5B">5B</option><option value="6A">6A</option><option value="6B">6B</option><option value="7A">7A</option><option value="7B">7B</option><option value="8A">8A</option></select>
<br>
Family Email<input type=text name=AddChildEmail id=field_3 size='40'>
<input id="saveForm" type="submit" value="Submit" name="submitbutton" />
</form>
</body>
</html>
and that is my thank you.php file in the same directory as the main form:
<html>
<body>
<?php
require_once("xx/formtools/global/api/api.php");
$fields = ft_api_init_form_page(28);
ft_api_clear_form_sessions();
?>
This is the thank you page
</body>
</html>
THanks for you help!