The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Form make empty entries in Database - 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: Form make empty entries in Database (/showthread.php?tid=510)



Form make empty entries in Database - mr_twin - Feb 11th, 2010

Hello,
I have a problem with FormTools.
When I go to the form on my website without to fill in something an went back to another site of my homepage (over backbutton from Firefox or over my pagenavigation), Formtools make an empty entry in my database.

As soon as run the form, it makes an NULL entry. What goes wrong?

Sorry for my bad english. I hope you can understand Smile

Thank you very much!
Have a nice day!
Marcel


RE: Form make empty entries in Database - Ben - Feb 12th, 2010

Hi Marcel,

No, I think I understand!

So is your form an API form or a direct form? If it's a direct form and you're getting duplicate entries that means that the user has clicked back in their browser and clicked "OK" to the popup that says "are you sure you want to resubmit the form?" (or whatever).

If it's the API then yes, it will always make a new empty, unfinalized record in the database. But this isn't so bad. What you can do is just clean out the dud data using this function ft_api_delete_unfinalized_submissions. See:
http://docs.formtools.org/api/?page=ft_api_delete_unfinalized_submissions

You should be able to just add that line to the top of your API form and it will only delete old dud data.

Let me know how it goes!

- Ben


RE: Form make empty entries in Database - mr_twin - Feb 15th, 2010

Hi Ben,
thanks for your hint. I use the API for our form.
I add ft_api_delete_unfinalized_submissions to the top of my API form and it works great. Now it went like clockwork Smile

Great thanks Smile That was a great help!

Greetings
Marcel