Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Retaining data in a form that has Spry

New Here ,
Jun 03, 2009 Jun 03, 2009

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!

TOPICS
Server side applications

Views

410
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Jun 03, 2009 Jun 03, 2009

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.

Votes

Translate
People's Champ ,
Jun 03, 2009 Jun 03, 2009

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines