Jump to content

I need to show data after pressing browser's back button [accidentally pressed ENTER instead of TAB]


EdDLearner

Recommended Posts

not sure if this will find an answer but I am posting anyway. Any help is appreciated....my coder has left the team and no matter how I invite her to come and do some bug squashing, her new schedules won't fit a re-visit into my little aplication...I am eager to delve into the codes at my very low knowledge of php. I have initiated reading and is still trying to teach myself...but of course not as fast as the app needs the patch...here's the meat:

 

I have a form, with 20 or so info field, and get's filled-up manually from a checksheet....problem is when I accidentally press ENTER instead of TAB, it goes to incomplete info error catcher then when I press the browser's back button, all inputted data are gone.

 

Is there a way to retain the data when I press the back button....or any other solution that I can look into to resolve this dilemma?

 

again Thanks for any suggestion

 

#notyourcoderguybutmuchwillingttolearn dude

Mr. EdDLearner

Link to comment
Share on other sites

 

 

problem is when I accidentally press ENTER instead of TAB, it goes to incomplete info error catcher then when I press the browser's back button, all inputted data are gone.

 

When you hit enter you are submitting the form. There is apparently no validation code, client side, that would prevent this.

You need some client side validation code that would prevent the form from submitting to the server until all required fields have been filled out. If, for some reason, client side validation is not possible, then when the form reaches the server side script, you need to do your validation there. If all required fields are not filled out, you need to fill in a template page with the submitted data that was filled in and echo that same form to the screen. In the template, you can use CSS and empty DIVS to let the user know that not all of the required fields have been filled out. 

 

Maybe others can point you to a good tutorial/example on how to best accomplish this task.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.