473,796 Members | 2,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forms Retaining Data

A question came up at work from one of our clients about forms on their
site.

The data from these forms are processed by a PHP script and if all goes
well, a thank you screen appears. Sometimes, when you go back to the form
(by clicking the back button), the data is still there in the form fields.
Other times it is not. The client would like to ensure the data remains, as
they sometimes have multiple submissions to make with similar entries.

There is client-side validation (JavaScript) on the forms, but other than
that, nothing else special about them.

Is there a way to ensure the values in the fields remain on return, or is
this just a quirk in browsers? The most commonly used browsers are IE & NN.

I would include a link to the form in question, but it is a request form for
a gubernatorial service (sent directly to the Gov's office), and I'd hate to
see them receive bogus requests.
Thanks.

--
SamMan
Rip it to reply

Jul 20 '05
65 4517
On Sat, 1 May 2004, Alan J. Flavell wrote:
On Sat, 1 May 2004, SamMan wrote:
If JS is disabled, the form can be submitted with all blank fields. ...
So, js verification of the data can be a useful optional -extra- (to
avoid wasteful submission/rejection cycles), but must NEVER be
considered as an alternative to server-side validation of the input.


A point that all too many AMATEUR web designers often fault on. Just because
you're paid doesn't make you a professional in this case. Professionals have
training that makes them see these TRIVIAL matters and avoid them.
The client does not want this.


What the client wants, and what the WWW will do, are not necessarily
the same thing. It's our job as developers to resolve such
inconsistences ;-}
Just because JS is disabled, doesn't mean the form submit button
won't work.


I'm convinced that you also said the opposite. But no matter: your
server-side script can get invoked by anyone with a mind to do it, no
matter how hard you try to stop it in your HTML.


He said something different but not necessarily opposite. He could have his
submit button code between <script> tags and not offer it in the <noscript>
alternative, or offer one with a "disabled" control in the <input> tag.
However, he was clear: If JS is disabled, so is his submit button.
And I'd have to agree with those who pointed out the implications of
the WAI requirements if this is, for example, government work.

Jul 20 '05 #41
"SamMan" <sa*@psfdevri p-it.com> wrote in
news:EB******** ********@twiste r.rdc-kc.rr.com:
A sightless person has tested the forms and was able to fill out &
submit them.


The proper term is "blind." Every single advocacy organization run by
blind people uses that word in their group's name. It's how blind people
refer to themselves. It's only one syllable. It's been in use for
centuries.

Euphemisms like "sightless" convey the impression that someone is concerned
about not offending members of some group, but doesn't know very much about
said group, certainly not enough to know what they might or might not find
offensive. The actual effect is to make one sound, not sensitive, but
patronizing.

Oh, and avoid "visually impaired"; it's too imprecise. In an
accessibility/usability context, what will work for someone who cannot use
their vision, no matter how augmented, to use a site/product/technology and
what will work for someone who uses their vision with heavy augmentation
are often quite different (though in many cases, the correct solution is
simply to get out of the user's way and not try to second-guess him).
Jul 20 '05 #42
On Sun, 02 May 2004 06:48:38 GMT, "D. Stussy" <kd****@bde-arc.ampr.org>
wrote:
On Fri, 30 Apr 2004, Sherm Pendley wrote:

What happens when a user hits return? A button isn't the only way to submit
a form...


That usually only works when there is a SINGLE text-type input field.
Otherwise, you will find that many browsers don't submit upon a carriage return.


Just to clarify: pressing Return (whether focus is in a single-line text
input field or not) does not, in itself, submit a form. Submit buttons
function as "default button", which means that they, in some
circumstances, react to the Enter key being pressed even if focus is
somewhere else. If the submit button is disabled, as the OP indicated,
this will of course have no effect.

Gertjan.

--
Gertjan Klein <gk****@xs4all. nl>
Jul 20 '05 #43
On Sun, 2 May 2004, Gertjan Klein wrote:
Just to clarify: pressing Return (whether focus is in a single-line text
input field or not) does not, in itself, submit a form.
That doesn't clarify anything - as a general statement, it's just
plain wrong.
Submit buttons function as "default button",


Sorry, I don't understand what you're trying to say. Maybe you're
describing the user interface conventions in one particular browser
implementation, but I'm sure that this is not a property of the WWW
specifications in themselves.

In the terms of the HTML2.0 specification (RFC1866),
http://www.w3.org/MarkUp/html-spec/h..._8.html#SEC8.2 (second
paragraph), it's not even essential for such a form to *have* any
submit button (I'm not actually recommending that, but it would at
least be logically consistent).

And many browsers still behave in conformance with that part of the
original spec, whatever they might do in other situations.

hth.
Jul 20 '05 #44
Neal <ne*****@yahoo. com> wrote:
On Sat, 01 May 2004 19:12:08 -0400, Harlan Messinger
<hm*********** ********@comcas t.net> wrote:
When I said "this is a
case where pop-up windows may be necessary", by "this" I didn't mean
"the OP's problem". I meant "pages with forms on them that also
contain links people are likely to click while they are completing the
form". I was referring to another issue that has been raised here many
times: pop-up windows, which some people are opposed to altogether. So
I'm saying, *this* (forms with Help links, for example) is a case
where pop-up windows may be indispensable.

Judicious use of the title attribute could perhaps solve the problem you
describe. Really, if the user filling out the form needs a whole web page
to describe how to do it, perhaps that should be worked in a little better
than a link in the form.


No matter how you do it, there are really only two choices: either
have all of the how-to on the same page as the form, or have it on a
separate page. If it's on a separate page, then the user is going to
want to go back and forth between the form and the instructions, and
that can cause the problem that has been described. In bringing this
up at all, I was presupposing there was a reason why the instructions
might be too lengthy to include on the page with the form; or the Help
page might be a site-wide help that needs to be accessible from every
page on the site, or from *every* form on a site that has a large
number of forms. Of course, using SSI, the same instructions could
just be included *on* every page with a form.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #45
On Sun, 02 May 2004 06:57:42 GMT, "D. Stussy"
<kd****@bde-arc.ampr.org> wrote:
I'm convinced that you also said the opposite. But no matter: your
server-side script can get invoked by anyone with a mind to do it, no
matter how hard you try to stop it in your HTML.


He said something different but not necessarily opposite. He could have his
submit button code between <script> tags and not offer it in the <noscript>
alternative, or offer one with a "disabled" control in the <input> tag.
However, he was clear: If JS is disabled, so is his submit button.


JS available is not a black and white thing, you can have script
enabled but no onsubmit/onclick event for example.
If you use NOSCRIPT in your pages, you're not taking enough care with
your script. NOSCRIPT should not be used.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #46
On Sun, 2 May 2004, Jim Ley wrote:
If you use NOSCRIPT in your pages, you're not taking enough care with
your script. NOSCRIPT should not be used.


Sounds like a topic that calls for being covered in your FAQ, no?
Jul 20 '05 #47
On Sun, 2 May 2004 15:08:30 +0100, "Alan J. Flavell"
<fl*****@ph.gla .ac.uk> wrote:
On Sun, 2 May 2004, Jim Ley wrote:
If you use NOSCRIPT in your pages, you're not taking enough care with
your script. NOSCRIPT should not be used.


Sounds like a topic that calls for being covered in your FAQ, no?


I no longer edit it, I'll try and encourage the current editor in that
direction though.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #48
Eric Bohlman wrote:
In an accessibility/usability context, what will work for someone who
cannot use their vision, no matter how augmented, to use a
site/product/technology and what will work for someone who uses their
vision with heavy augmentation are often quite different (though in
many cases, the correct solution is simply to get out of the user's
way and not try to second-guess him).


That is the easiest and most efficient thing to do. Pity so many don't
take that advice.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #49
Eric Bohlman <eb******@earth link.net> wrote:
Oh, and avoid "visually impaired"; it's too imprecise. In an
accessibility/usability context, what will work for someone who cannot use
their vision, no matter how augmented, to use a site/product/technology and
what will work for someone who uses their vision with heavy augmentation
are often quite different
Yep. And often, what works for two individuals with basically the same
degree of vision loss will be quite different.
(though in many cases, the correct solution is
simply to get out of the user's way and not try to second-guess him).


Amen.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"You learn nothing new the third time a mule kicks you in the head."
Jul 20 '05 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2053
by: Vanessa | last post by:
Hi all ! I am looking for a php class and page layout framework allowing smooth object oriented insertion of several, possibly different, forms within the same page layout. All of that while retaining the very desirable properties of a great php class : - self contained - auto validation
1
12228
by: noor | last post by:
Hi I have been working since 2 days to device a method to export sql table into csv format. I have tried using bcp with format option to keep the column names but I'm unable to transfer the file with column names. and also I'm having problems on columns having decimal data. Can any one suggest me how to automate data transfer(by using SP) and retaining column names. Thanks Noor
9
1739
by: JW | last post by:
Dear NG, Still working on my .NET CF C# forms application ... I have an array of forms that I wish to display in array order, and thus have created a loop to run through them. Due to functional and speed reasons (this app. will be deployed to a PocketPC) I want to merely Hide() each form when the user is finished with it, rather than allow it to Close(). In this way the user can "back" button their way back to each previous form...
4
5645
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no SSL no forms auth. One of the subfolders in the public area is the root of a "protected" area; SSL is required from this subfolder on forward and a web.config in the subfolder specifies forms authentication. From the public area, I provide a...
3
1410
by: Rob | last post by:
I am doing something wrong in declaring variables for forms I want to load. When the declaration is read, the form closes. I have a form, Form1, that loads at startup. After the Windows-generated code for Form1, there are a few declarations: Public Shared frm2 As New Form2, Public Shared frm3 As New Form3, etc., for five different forms called from Form1. I've just added a new form to the application, Form6, and declared it as...
5
11903
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My dropdown list control does not retain its SelectedValue. Unless I read the SelectedValue right after the control has been loaded, populated, and assigned with its original value (and of course that is
5
1812
by: David Cartwright | last post by:
Hi all, I'm using a DataGrid to present a tabulated list (actually a list of users logged in to my phone system) - it seemed the most appropriate control. As stuff happens on the phone system, my program changes the colours of various lines - so if someone's on the phone their line would turn red, when they hang up it turns green, and so on. The thing is, though, when you re-order the grid elements by clicking on the column headers,...
4
2237
by: RoMo | last post by:
I am using VB .NET (2003) for a project that includes a datagrid on one form that allows the user to switch to details on a second form. The datagrid was built in design mode with all the proper style information. The user types in a part of a company name and a database search returns matching data (via ADO) to a dataset. If more than 1 matching company was found, the datagrid is made visible and has its source and member assigned to the...
2
1860
by: s4lin | last post by:
problem is pagination not retaining data field i have form with general data field, and i need to select some option which is store in database, so i open another page with retrieving data from table with pagination form data's are retaining if i select from first page but data not retaining if i select option from other than 1st page. i m using hidden field in pagination page. Thanks stalin
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.