Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16758 > unrolled thread
| Started by | mike7411@gmail.com |
|---|---|
| First post | 2016-06-05 17:35 -0700 |
| Last post | 2016-06-06 07:00 -0400 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.php
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
| From | mike7411@gmail.com |
|---|---|
| Date | 2016-06-05 17:35 -0700 |
| Subject | form clears |
| Message-ID | <17ae5655-a03c-406a-96aa-329855db29d7@googlegroups.com> |
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/ Thanks.
[toc] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2016-06-06 07:55 +0200 |
| Message-ID | <drkhhoF6vokU1@mid.individual.net> |
| In reply to | #16758 |
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
[toc] | [prev] | [next] | [standalone]
| From | bill <william@TechServSys.com> |
|---|---|
| Date | 2016-06-06 07:00 -0400 |
| Message-ID | <nj3l55$1u49$1@gioia.aioe.org> |
| In reply to | #16758 |
On 6/5/2016 8:35 PM, 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/ > > Thanks. > > > The basic answer is that you are loading a new copy of the html. some browsers will reload the prior values, FireFox does, but as noted by J.O. Aho it really is your responsibility to handle that. bill
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web