Jump to content
Sign in to follow this  
EdDLearner

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.