CSS forms?

S

Silkster

Hi everyone...Hope you can help me...

I have quiet a few forms to create soon and Iam not totaly up on
them...
What I would link to to do is instead of having the <lable> then the
<input>
is just have the form field with the instructions in side eg:
[__Enter Your First Name Here_____]
and when the user click in the filed the text disapears.

I know this can be done with javascript and the ecomerce site I am
doing needs to have javascript switched on

But what do I do with the lable field?
and what impact does the senarion have on accessability?

Cheers
Silkster
 
B

Benjamin Niemann

Hello,
I have quiet a few forms to create soon and Iam not totaly up on
them...
What I would link to to do is instead of having the <lable> then the
<input>
is just have the form field with the instructions in side eg:
[__Enter Your First Name Here_____]
and when the user click in the filed the text disapears.

I know this can be done with javascript and the ecomerce site I am
doing needs to have javascript switched on

But what do I do with the lable field?
and what impact does the senarion have on accessability?

I don't think, this is a good idea - even if you can rely on the presence of
JS in the user-agent.

Can you rely on the inputs always being wide enough to show the complete
instructions? If the instructions are clipped, there's no way for the user
to see the hidden part, because once she clicks on it to scroll to the
right it will disappear.

And a problem that people like me with a very 'selective' short-term memory
will have: click on the input and immediately forget what was written
there, e.g. for dates: "was is YYYY-MM-DD or MM-DD-YY or ... ?"

If your layout is so tightly packed that you think there's no space left for
labels beside the form controls, than the real problem is your layout.


HTH
 
T

The Eclectic Electric

Silkster said:
Hi everyone...Hope you can help me...

I have quiet a few forms to create soon and Iam not totaly up on
them...
What I would link to to do is instead of having the <lable> then the
<input>
is just have the form field with the instructions in side eg:
[__Enter Your First Name Here_____]
and when the user click in the filed the text disapears.

I know this can be done with javascript and the ecomerce site I am
doing needs to have javascript switched on

But what do I do with the lable field?
and what impact does the senarion have on accessability?

If they're all text inputs then could you not use the value attribute to
enter the instructions within the input? Of course, it wouldn't disappear
when they clicked it (could make it do that with JS for those with it
enabled) and you could end up with them posting your labels back at you.

+e
 
J

Jonathan N. Little

Silkster said:
Hi everyone...Hope you can help me...

I have quiet a few forms to create soon and Iam not totaly up on
them...
What I would link to to do is instead of having the <lable> then the
<input>
is just have the form field with the instructions in side eg:
[__Enter Your First Name Here_____]
and when the user click in the filed the text disapears.

I know this can be done with javascript and the ecomerce site I am
doing needs to have javascript switched on

But what do I do with the lable field?
and what impact does the senarion have on accessability?

Don't know, but I think most are intuitive and can understand when they
see a label "Name;" and a text box to the left that their name should be
entered in that box. LABEL and INPUT will work on all browsers and even
text only ones (e.g., Lynx) whereas JavaScript will not. If extra
instruction is required you can always add it "Date (yy-mm-dd):" and
follow up with your validation...

There is something to be said for convention, put a cylindrical knob
half way up and on the right side of door and folks' first impulse will
be to turn it and not press that button in the center to open the door.
Convention is your friend as a designer...
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top