Naming Conventions for Form Fields

C

CLJinVA

I've been having problems with a form and I'm wondering if how I've named the
Form Fields is causing it. A course I'm taking shows the names of form
fields preceeded by an underscore, i.e. _nameoffield.

Should I be doing that too? My field names are straight text, no spaces or
anything else.

Thx
 
K

Kevin Spencer

Should I be doing that too? My field names are straight text, no spaces
or
anything else.

Not necessarily. It is good to establish some form of naming convention,
just for your own (and any other developers working on the project)
convenience. You're already following the correct rules for HTML.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
S

Steve Easton

I've seen underscores used in place of spaces, name_of_field because spaces "can" break form field
names.

But I've never seen a leading underscore. I personally wouldn't use it.
( because I've never seen it doesn't mean they're not used )

;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
C

CLJinVA

Thx. I use them too for spaces in names, but this one threw me, and of
course, the on-line course that used them didn't address it. Thx again
 
M

Murray

Leading underscores frighten me.

--
Murray

CLJinVA said:
Thx. I use them too for spaces in names, but this one threw me, and of
course, the on-line course that used them didn't address it. Thx again
 
K

Kevin Spencer

Leading underscores frighten me.

Just look at them upside-down, Murray. They they'll be TRAILING underscores!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
M

Murray

When I put my monitor on its side, they are dangling underscores. And they
are still scary.
 
C

Clark

Not that it matters, but I avoid the whole underscore / space thing by using
capital letters at the beginning of words. Instead of this_page.htm I use
ThisPage.htm. Works for me.
 
M

Murray

As long as you are hosted on Windows servers, this is OK, but allow *nix
into the fray and you are asking for trouble using Caps. I heartily
recommend always using all lowercase letters/numbers (no leading numbers,
though), no spaces, no nothing else except dashes or underscores (<shiver>
not leading ones, though), and you will be just fine in any OS.
 
C

Clark

Yah - I was wondering about the unix dudes even as I wrote that. I know that's a
place where some poor souls are forced to go :=(

Oh, the pain.

Thanks for the quick followup clarification.
 
M

Murray

You're welcome!

--
Murray

Clark said:
Yah - I was wondering about the unix dudes even as I wrote that. I know
that's a
place where some poor souls are forced to go :=(

Oh, the pain.

Thanks for the quick followup clarification.
 
T

Thomas A. Rowe

Clark,

I also prefer the format that you use as well, since I only work on Windows IIS web servers.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Top