Copy link to clipboard
Copied
I have a PHP form with a Captcha, on submit the Captcha is validated, if entered wrong it takes you back to the same page. I had a problem with the input fields loosing their data but I was able to solve it by entering inside the value fields value="<?=$_POST['name'] ?> and so on. But it doesnt seem to work with the fields that have the Spry validation. Even without any other scripts, it never saves the data or shows a dropdown of previous data entered. Any ideas how to retain the data? I would probably have to do some editing to SpryValidationTextField.js? Thanks!
Have you tried using a cookie? but the <?= $_POST['name'] ?> should also work. As Spry does not delete the current value from your inputs. Unless you specify a hint.
Copy link to clipboard
Copied
Have you tried using a cookie? but the <?= $_POST['name'] ?> should also work. As Spry does not delete the current value from your inputs. Unless you specify a hint.
Copy link to clipboard
Copied
Did not specify a hint. Data is just gone if page is refreshed. The cookies method worked. I used this script http://www.acky.net/tutorials/javascripts/cookies/. Would have been niced if I only had to rely on $_POST but oh well.