Oct 9th, 2013, 4:37 AM
I have set up my very first API form it is a single API form.
I was able to set it up so that it is "live" and hitting the database, however after the initial submission every subsequent submission over writes the previous submission. The php code for my Submission Form page is:
<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
$params = array(
"submit_button" => "nomination",
"next_page" => "nomination_thankyou.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
The Form action:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data" />
<input type="hidden" name="nominationform" value="" />
My Submit button:
<input type="submit" value="Submit" name="nomination"/>
I tried 2 configurations for the code for my "Thank You" page:
1)
<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
ft_api_clear_form_sessions(nominationform);
?>
and 2)
<?php
require_once("../formtools/global/api/api.php");
ft_api_clear_form_sessions(nominationform);
$fields = ft_api_init_form_page(17);
?>
The form submits fine but it over writes the same record in the database and will not advance to the next record.
Any help would be gratefully received.
Thanks Diana
I was able to set it up so that it is "live" and hitting the database, however after the initial submission every subsequent submission over writes the previous submission. The php code for my Submission Form page is:
<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
$params = array(
"submit_button" => "nomination",
"next_page" => "nomination_thankyou.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>
The Form action:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data" />
<input type="hidden" name="nominationform" value="" />
My Submit button:
<input type="submit" value="Submit" name="nomination"/>
I tried 2 configurations for the code for my "Thank You" page:
1)
<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
ft_api_clear_form_sessions(nominationform);
?>
and 2)
<?php
require_once("../formtools/global/api/api.php");
ft_api_clear_form_sessions(nominationform);
$fields = ft_api_init_form_page(17);
?>
The form submits fine but it over writes the same record in the database and will not advance to the next record.
Any help would be gratefully received.
Thanks Diana