Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16759
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: form clears |
| Date | 2016-06-06 07:55 +0200 |
| Message-ID | <drkhhoF6vokU1@mid.individual.net> (permalink) |
| References | <17ae5655-a03c-406a-96aa-329855db29d7@googlegroups.com> |
On 06/06/2016 02:35 AM, mike7411@gmail.com wrote: > Anyone know why a form clears when I go back to it? > > All of the fields seem to clear on this form if there's an error and I hit the back button: > > http://www.coolfone.mobi/ads/ As the value in the input tag is not set to a value, it will be empty. When you display the error, you should have a button/link which takes you back to the form, you also store the values to a session. When you display the form you check in your session if there are any values set, if, then populate the value in each input from the session. Remove the values from the session as you have repopulated them. -- //Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
form clears mike7411@gmail.com - 2016-06-05 17:35 -0700 Re: form clears "J.O. Aho" <user@example.net> - 2016-06-06 07:55 +0200 Re: form clears bill <william@TechServSys.com> - 2016-06-06 07:00 -0400
csiph-web