Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16759

Re: form clears

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: form clears
Date Mon, 6 Jun 2016 07:55:04 +0200
Lines 19
Message-ID <drkhhoF6vokU1@mid.individual.net> (permalink)
References <17ae5655-a03c-406a-96aa-329855db29d7@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace individual.net 742MvC7wvfoiTTU02g7nWQ5cX98wz6D/sxwmy1ur/fo1qXdlg2
Cancel-Lock sha1:zwL+UGyQh/m1S/vvJYNPRvk/tgU=
X-Enigmail-Draft-Status N1110
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
In-Reply-To <17ae5655-a03c-406a-96aa-329855db29d7@googlegroups.com>
Xref csiph.com comp.lang.php:16759

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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