[BNM] PHP Question
Alan Braddish
alan at webspoke.co.uk
Fri Feb 9 16:21:26 GMT 2007
Jay, Thanks,
I have sorted it out using Session vars. Once the form is posted, the
session captures the form. If the form is re-displayed, value="" fields are
populated, including drop-downs, radio and check boxes.
It works a treat, but was quite labour intensive, considering the form had
80 or so fields!
Wonder if there is a shortcut way of doing this in PHP?
Alan
-----Original Message-----
From: bnmlist-bounces at brightonnewmedia.org
[mailto:bnmlist-bounces at brightonnewmedia.org] On Behalf Of Jay Caines-Gooby
Sent: 09 February 2007 15:47
To: Brighton New Media
Subject: Re: [BNM] PHP Question
On 2/9/07, Alan Braddish <alan at webspoke.co.uk> wrote:
> Hi all,
>
> Got a problem with a PHP form. When a user fills out the form, and clicks
> Submit, they are taken to a "thank you" page. However, if the user clicks
> the browser's back button, they go back to the form, but all the form
field
> contents are blank, as if the page has reloaded?
>
> Is there any way to stop this behaviour so that if they click back, the
> forms contents are preserved?
This should be a function of the PHP page rendering the form; on first
view all fields are blank, on backup the session management you employ
should ensure that all the value= attributes are set and any chosen
options in select lists are retained.
There's nothing more infruiating than a form that validates, tells you
that you've left a mandatory entry blank and then forces you to fill
out the *whole form again*, because they can't be arsed to try and
retain your input.
--
Jay Caines-Gooby
jay at gooby.org
+44 (0)7956 182625
skype:jaygooby
http://snipperoo.com
http://blog.snipperoo.com
--
BNM Subscribe/Unsubscribe:
http://lists.wessexnetworks.com/cgi-bin/mailman/options/bnmlist/
BNM info/archives:
http://www.brightonnewmedia.org/
BNM archive search:
http://www.roddis.org/bnm/search.php
BNM powered by Wessex Networks:
http://www.wessexnetworks.com
More information about the BNMlist
mailing list. Powered by Wessex Networks