FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Captcha form gets prefilled only after refresh
#1
Sad 
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.
Reply
#2
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)) {
    $fields = array_merge($fields, $_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
Reply
#3
Thanks ben. It works great.
Reply
#4
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
Reply
#5
I have just read this and tried it and it works.

Thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)