The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
demo sample http://www.benjaminkeen.com/software/rsv/standalone/demo.php?page=7 - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: demo sample http://www.benjaminkeen.com/software/rsv/standalone/demo.php?page=7 (/showthread.php?tid=1524) Pages:
1
2
|
RE: demo sample http://www.benjaminkeen.com/software/rsv/standalone/demo.php?page=7 - Ben - Aug 21st, 2011 Hi Wout, I don't know about the "NULL" thing - all submissions in the database will have a unique submission ID (it's an auto-increment column, so NULL isn't possible). But yes, with multi-page forms you'll see the number erratically increase. This is because not everyone will complete the form, but *everyone* that arrives at the form will have a record created in the database. Only when they actually finish putting through the submission will the record appear in the Form Tools admin - because at that point, the submission has been finalized (i.e. told that it's now complete). So in fact, your database table will eventually fill up with a lot of old, incompleted unfinalized submissions. To clear those out, see this function: http://docs.formtools.org/api/?page=ft_api_delete_unfinalized_submissions All the best - Ben RE: demo sample http://www.benjaminkeen.com/software/rsv/standalone/demo.php?page=7 - wout - Aug 21st, 2011 Hello Ben, Do I have to put: ft_api_delete_unfinalized_submissions($form_id, false); on each multipageform? or only at the last submit page? Something like this: <?php require_once ("global/api/api.php"); $fields = ft_api_init_form_page(); $params = array( "submit_button" => "sbmt", "next_page" => "stap7.php", "form_data" => $_POST, "no_sessions_url" => "index.php", "finalize" => true ); ft_api_delete_unfinalized_submissions(3, false); ft_api_process_form($params); ?> 3 is the number of the form ID. Thanks, regards Wout RE: demo sample http://www.benjaminkeen.com/software/rsv/standalone/demo.php?page=7 - Ben - Aug 22nd, 2011 Hi Wout, All the ft_api_delete_unfinalized_submissions() function does is delete old, unwanted submissions, so it really doesn't need to be called that often. I'd just add it to your thankyou.php - that would ensure it gets called often enough! Quote:ft_api_delete_unfinalized_submissions(3, false); And yes, this looks good! - Ben |