473,785 Members | 2,829 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 4515
"Sherm Pendley" <sp******@dot-app.org> wrote:
What happens when a user hits return? A button isn't the only way to
submit a form...

SamMan <sa*@psfdevri p-it.com> wrote: Nothing. The form is not submitted.


Let's try again.

What happens if the user submits the form anyway, even though you've tried
to prevent them from doing so?

Perhaps they use normal browser functions. Hitting the Enter key is one way
that browsers allow the user to submit a form without the submit button.

Perhaps they edit your form, add a submit button, and submit the edited
version of the form. It isn't hard to do if you know what you're doing.

And given the relationship between your site and the government, you may be
legally required to provide non-JavaScript functionality.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"Warning: Dates in the calendar are closer than they appear."
Jul 20 '05 #21
On Sat, 01 May 2004 01:57:27 GMT, "SamMan" <sa*@psfdevri p-it.com> wrote:
"Michael Wilcox" <mj************ @yahoo.com> wrote in message
news:c6******* *****@ID-230276.news.uni-berlin.de...
SamMan wrote:
> Yes... and only because I have coded it so. Without the code I wrote, ifthe > user has JS disabled, the submit button still functions.


That's a poor choice. The user's browser may not have JS,


<snip>

What browser does not have JS? On my workstation, I have IE, NN (4 & 7),
Mozilla, Opera... all of them have JS, and it is enabled by default. This is
on a PC. I have also tested on Mac IE and Safari, both with JS.


Perhaps you would consider the points raised in
http://www.xs4all.nl/~sbpoley/webmatters/whatnojs.html

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #22
"Michael Wilcox" <mj************ @yahoo.com> wrote in message
news:c6******** ****@ID-230276.news.uni-berlin.de...
SamMan wrote:
I agree that it would be better to do all error checking on the server, but like I have stated before, I have to accommodate the developer who has
little to no experience in JS, let alone anything that happens on the server side. They are the one who has "official" control over the site, and as
such, things must be done to make it easier for them... one of the pitfalls of working for a government agency.
Could you write the necessary PHP code? Would "they" allow it?


No, I have inquired already...

And since you brought up the government, I'll quote a government
document. Section 508 <http://www.access-board.gov/sec508/guide/act.htm>
requires all government webpages to comply with its regulations, one of
which reads, "When electronic forms are designed to be completed
on-line, the form shall allow people using assistive technology to
access the information, field elements, and functionality required for
completion and submission of the form, including all directions and
cues." Most assistive technologies are incapable of rendering JS, and
they therefore render what is in the noscript element. At your page,
this is their only option, and they can never submit the form, which
contradicts these regulations.


A sightless person has tested the forms and was able to fill out & submit
them.
Jul 20 '05 #23
"Darin McGrew" <mc****@stanfor dalumni.org> wrote in message
news:c6******** **@blue.rahul.n et...
"Sherm Pendley" <sp******@dot-app.org> wrote:
What happens when a user hits return? A button isn't the only way to
submit a form...

SamMan <sa*@psfdevri p-it.com> wrote:
Nothing. The form is not submitted.


Let's try again.

What happens if the user submits the form anyway, even though you've tried
to prevent them from doing so?

Perhaps they use normal browser functions. Hitting the Enter key is one

way that browsers allow the user to submit a form without the submit button.

Perhaps they edit your form, add a submit button, and submit the edited
version of the form. It isn't hard to do if you know what you're doing.

And given the relationship between your site and the government, you may be legally required to provide non-JavaScript functionality.
--

If the user succeeds in submitting a form, a blank submission would be sent
to an e-mail address and ignored. I understand you're point, but if a person
goes to the trouble of editing the form to submit a blank one, all they will
have succeeded at is sending a form that will be ignored.

You do bring up a good point about non- JS functionality that I can use in
my defense of doing the error checking backend.

--
SamMan
Rip it to reply
Jul 20 '05 #24
On Sat, 1 May 2004, SamMan wrote:
If JS is disabled, the form can be submitted with all blank fields.
With respect: reading the thread before and after this posting of
yours, you seem to have contradicted yourself several times on that
point. I'm no longer sure quite -what- you're claiming will happen.

But, as I've said before, and as others have said on this thread, it's
essential for a server-side process to cope with -any- input that gets
thrown as it. There's no way - repeat: NO way - that anything in your
HTML or js can protect the server against defective or plain malicious
inputs, and if the server-side process then does something harmful,
that's your fault (as developer of the procedure) for letting it.

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.
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.

And I'd have to agree with those who pointed out the implications of
the WAI requirements if this is, for example, government work.

good luck with the project
Jul 20 '05 #25
Alan J. Flavell wrote:
On Sat, 1 May 2004, SamMan wrote:
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 ;-}


That's another of those nuggets that belongs in a faq or something. Well
said!

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #26
SamMan wrote:
A sightless person has tested the forms and was able to fill out & submit
them.


*One* person trying the site with *one* browser doesn't mean everyone
will have the same experience. Did this person use an assistive
technology, as required by Section 508? Did they accomplish it without
JS and without the direction of someone else?

(BTW, I never wished to turn this into a flame thing, so I'll try to
keep out the maliciousness as much as possible.)
--
Michael Wilcox, http://mikewilcox.t35.com/
Jul 20 '05 #27
Michael Wilcox <mj************ @yahoo.com> wrote:
SamMan wrote:
The client would like to ensure the data remains, as
they sometimes have multiple submissions to make with similar entries.


This is a feature implemented in many browsers, but not all.


I hate to say it, but this is a case where pop-up windows may be
necessary--unless someone can come up with another way to handle a
form complicated enough to justify inclusion of Help links. If a user
has partially completed a form when he clicks a Help link, then after
the Help page has loaded in his browser, and he has hit the Back
button to return to his form, I guarantee that he will be annoyed if
his previous entries have all disappeared.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #28
Harlan Messinger wrote:
I hate to say it, but this is a case where pop-up windows may be
necessary
Well, if PHP is available, popups are hardly necessary. I wish I could
think of a good solution when PHP isn't available, but a well designed
site should have to rely on potentially missing features.
unless someone can come up with another way to handle a
form complicated enough to justify inclusion of Help links.


I don't think the form in question is complicated (although I haven't
seen it), but I think the question is whether or not you could submit it.
--
Michael Wilcox, http://mikewilcox.t35.com/
Jul 20 '05 #29
SamMan wrote:
A sightless person has tested the forms and was able to fill out & submit
them.


I forgot to add: Since a user with an assistive technology might fill in
the entire form, then find out he/she can't even submit it, why put put
a warning in noscript tags that this user won't be able to submit the
data. (Mean rant: Why would you do this? Why can't you just let a few
bad forms go through? Most people will probably fill them in regardless
of what browser they are using.)
--
Michael Wilcox, http://mikewilcox.t35.com/
Jul 20 '05 #30

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
1859
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
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10151
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
10092
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
9950
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
8973
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...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2879
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.