Part of form already filled in, is this possible

S

smk17

I've spent the last few minutes searching for this question and I
found an answer, but it wasn't quite what the client wanted.

I have a simple online form where the user needs to fill out five
fields out of nine. The other four are already there and filled out
for the user. When they hit submit, all data is sent to us.

But, if they desire (for whatever reason) the user can possibly delete
what is already there and fill in something else. We do not want that.

Is there a way to have that info already filled in and untouchable? I
thought about having it type="hidden" but I think the client wants the
user to be able to see it.

The test page example is here: http://gmptraining.aem.cornell.edu/international/05_international/back-05.htm

Thanks
Steve
 
A

Ari Heino

But, if they desire (for whatever reason) the user can possibly delete
what is already there and fill in something else. We do not want that.

Why does it have to be in the form then? What's wrong with using plain text?
 
S

smk17

Why does it have to be in the form then? What's wrong with using plain text?

Well, what is in that field needs to be submitted along with the users
name, etc. when they are done with the form.

I figured it out, I used the readonly attribute, like this:

<input readonly type="text" name="Department Phone"
value="631-632-8730" size="12">

Thanks
 
J

Jukka K. Korpela

smk17 said:
I figured it out,

I figured out that you multiposted.
I used the readonly attribute

So you found one of the wrong answers. It all fits together: you are
effectively asking for wrong answers that won't be corrected, if you
multipost. This time, you were corrected.

Yucca
 
S

smk17

I figured out that you multiposted.


So you found one of the wrong answers. It all fits together: you are
effectively asking for wrong answers that won't be corrected, if you
multipost. This time, you were corrected.

Yucca

Why on earth did you just waste your time writing this? I found an
answer that matched what the client needs. I multiposted because maybe
there are people on the other newsgroup that would know the answer if
no one here did. I guess I don't understand the evils of crossposting.
And I still do not understand your answer, I found one of the wrong
answers? Is readonly the wrong way to go about solving my particular
problem? I've tested it and it acts exactly as I want. ????

Damn, you never know what you are gonna step in when you post on here.
 
S

Sherm Pendley

smk17 said:
Damn, you never know what you are gonna step in when you post on
here.

What else did you expect? You posted the same question to every group
in sight, several times to each group, and admit that you spent only
"several minutes" trying to solve the problem on your own.

You reap what you sow. Better luck with your next question - I won't
be seeing it, and I'm sure quite a few others won't either. It's hard
enough trying to help people who *want* to learn.

*plonk*

sherm--
 
J

Jukka K. Korpela

smk17 said:
Why on earth did you just waste your time writing this?

To help people who might otherwise multipost and cause themselves and
everyone else harm. You had the option of learning from this, too.
I found an
answer that matched what the client needs.

Apparently you do not have a clue and do not want to have a clue. You are
just fooling yourself and offering your client a wrong solution that is a
wide open security hole.
I guess I don't understand the evils of crossposting.

Apparently not, and not even the difference between crossposting and
multiposting.
And I still do not understand your answer, I found one of the wrong
answers? Is readonly the wrong way to go about solving my particular
problem? I've tested it and it acts exactly as I want. ????

This only proves that you didn't do real testing - perhaps not even read my
answer in the other group.

Yucca
 
H

Harlan Messinger

smk17 said:
Well, what is in that field needs to be submitted along with the users
name, etc. when they are done with the form.

If you already have the information on the server, why do you need to
have it resubmitted in the form?
I figured it out, I used the readonly attribute, like this:

<input readonly type="text" name="Department Phone"
value="631-632-8730" size="12">

If your goal is to thwart people who actively want to change the value
you already have, you need to know that the ones who know Javascript can
do that with a little code typed into the browser's Address field. Even
with the readonly attribute, you have no guarantee that the data will
come back to you unchanged. For that matter, the same goes for hidden
fields.

Once when evaluating shopping cart services for commerce sites, I
discovered one that sent the price along with the product name and
description, storing it in a hidden field, and then using the value that
came back to calculate the amount to charge. So someone could have
ordered a product priced at $1000, paying only a penny for it.
 
S

smk17

What else did you expect? You posted the same question to every group
in sight, several times to each group, and admit that you spent only
"several minutes" trying to solve the problem on your own.

You reap what you sow. Better luck with your next question - I won't
be seeing it, and I'm sure quite a few others won't either. It's hard
enough trying to help people who *want* to learn.

*plonk*

sherm--

I posted this to every group in sight??????? I posted it to two
groups.
 
H

Harlan Messinger

smk17 said:
I posted this to every group in sight??????? I posted it to two
groups.
Then he's exaggerating, but the important thing is that you multiposted
rather than crossposting. Crossposting may be reasonable (but it should
be limited). Multiposting is sending a message to a newsgroup, then
starting a new message with identical or similar content and sending it
to another newsgroup. Cross-posting means addressing a single message to
multiple newsgroups in a single send. When you crosspost, all responses,
by default, show up in all the newsgroups, so that the same, single
conversation is being held--so I don't spend five minutes answering your
question in one newsgroup, only to find out that someone already gave
you the same answer an hour earlier in another newsgroup.
 
H

Harlan Messinger

Guy said:
Please note that while the above is standard practice in
technical newsgroups, in newsgroups that discuss politics
or religion crosposting has a quite different effect, and
that many such newsgroups have been destroyed by floods of
off-topic cross-posted flamewars.

It isn't that crossposting has a different effect, it's that it's being
abused in those places. But the same people doing that would usually be
posting off-topic and inciting flames even if they picked just one group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top