The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Captcha form gets prefilled only after refresh - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: Captcha form gets prefilled only after refresh (/showthread.php?tid=472) |
Captcha form gets prefilled only after refresh - sujith - Jan 30th, 2010 The form will not come pre-filled if i enter an incorrect captcha. But If i refresh the page, the fields get filled with the values. Link of the form http://www.kerala360.net/kerala-medical-travel.php I am getting the same issue on the sample form. That's why i opened a new thread for the issue. Link for sample formloaded page with nothing filled http://demo.formtools.org/forms/captcha/ Ben .... Please check and reply. RE: Captcha form gets prefilled only after refresh - Ben - Jan 31st, 2010 Hi sujith, Ah yes, I need to update that page. Thanks for the reminder! Add this code after your ft_api_init_form_page() function call: Code: if (isset($_POST)) { That will merge the incoming POST request with the values already stored in $fields (overwriting with the latest from the form). Hmm... it works fine, but I don't like it much. I'll have to revisit this at some point. Thanks sujith. - Ben RE: Captcha form gets prefilled only after refresh - sujith - Jan 31st, 2010 Thanks ben. It works great. RE: Captcha form gets prefilled only after refresh - freelancer - Aug 10th, 2010 hi i had the same problem but used the above fix. However, the file upload field does not get it's textfield refilled. I wondered if anyone know how to repopulate the field? thanks RE: Captcha form gets prefilled only after refresh - mikedoug88 - Feb 4th, 2011 I have just read this and tried it and it works. Thanks guys |