HTML forms and field verification

dquan97

Lifer
Jul 9, 2002
12,010
3
0
Let's say that you want the fields in the form to allow only a specific format (ie ph# or all lower-case). Any way to perform this verification using only html? I can't think of a way, but just making sure by asking you guys
 

JMaster

Golden Member
Feb 9, 2000
1,240
0
0
I don't think there is a way without using JavaScript or server side scripting.
 

fs5

Lifer
Jun 10, 2000
11,774
1
0
no there isn't a way. javascript is easy enough.. plenty of javascript sites out there scripts that do exactly this.
 

dquan97

Lifer
Jul 9, 2002
12,010
3
0
I know that this can be done through Javascript or PHP, but my supervisor (who's taking a class in HTML and posed this question) specifically stated that it has to be done in HTML. Anyone know about XHTML?
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
HTML/XHTML alone cannot process data. It is strictly a structure for displaying information to a client's screen. Your supervisor is a moron.

edit:

who's taking a class in HTML and posed this question


if he's taking a class to learn HTML, why do you believe him when he says it can be done
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Mebbe he was talking about xforms? Can't say I know much about them but I assume they're smarter than regular html forms.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
If it could be done in HTML itself, why do you think everyone else on the internet is doing it with Javascript, or server-side?

And no, HTML does not have that funtionality.
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Originally posted by: kamper
Mebbe he was talking about xforms? Can't say I know much about them but I assume they're smarter than regular html forms.

XForms absolutely will be able to validate input on their own.

W3C XForms FAQ
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
Originally posted by: bersl2
Originally posted by: kamper
Mebbe he was talking about xforms? Can't say I know much about them but I assume they're smarter than regular html forms.

XForms absolutely will be able to validate input on their own.

W3C XForms FAQ

XForms has several new submission methods compared with HTML Forms

xforms are not a part of HTML, they are an extension/plugin from what I read briefly.
 

Injury

Lifer
Jul 19, 2004
13,066
2
81
Originally posted by: screw3d
Note: HTML = Hypertext Markup Language.. not programming language.

EXACTLY.

HTML cannot, in any way, perform functions, computations, read or interpret input data or make changes based on input.

HTML can only create pages from code commands and pass variables through the use of forms. To put it simply, HTML is a write-only language. Even when you put information into forms, it does nothing more than to pass that information on. It does not care what is in the form, it does not discriminate between one blurb of information or the next, it simply passes it on.

As scr3ed said, it's not a programming language, it's a low-level markup language.

As far as XHTML, XHTML is only a new formatting of HTML... it's just HTML with a few new rules.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Zugzwang152
Originally posted by: bersl2
Originally posted by: kamper
Mebbe he was talking about xforms? Can't say I know much about them but I assume they're smarter than regular html forms.

XForms absolutely will be able to validate input on their own.

W3C XForms FAQ

XForms has several new submission methods compared with HTML Forms

xforms are not a part of HTML, they are an extension/plugin from what I read briefly.
I figured his boss maybe had them had them confused.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Injury
Originally posted by: screw3d
Note: HTML = Hypertext Markup Language.. not programming language.

EXACTLY.

HTML cannot, in any way, perform functions, computations, read or interpret input data or make changes based on input.

HTML can only create pages from code commands and pass variables through the use of forms. To put it simply, HTML is a write-only language. Even when you put information into forms, it does nothing more than to pass that information on. It does not care what is in the form, it does not discriminate between one blurb of information or the next, it simply passes it on.

As scr3ed said, it's not a programming language, it's a low-level markup language.

As far as XHTML, XHTML is only a new formatting of HTML... it's just HTML with a few new rules.
.
The fact that it's a markup language is irrelevant because specifying constraints is a totally different thing than enforcing constraints. html allows you certain constraints like the max length of a text box. The fact that you can't do general purpose form validation is not a fundamental limitation of the language type, it's just that it's not part of the specification. It would be easy to define a markup language that includes form validation and I believe that's what xforms actually is.

Sure, you still need executable code to enforce those constraints but it's totaly feasible (and in fact, a very good thing) to have that included in the client software instead of making devlopers reimplement it in javascript every time they make a new form.
 

dquan97

Lifer
Jul 9, 2002
12,010
3
0
Originally posted by: Zugzwang152
HTML/XHTML alone cannot process data. It is strictly a structure for displaying information to a client's screen. Your supervisor is a moron.

edit:

who's taking a class in HTML and posed this question


if he's taking a class to learn HTML, why do you believe him when he says it can be done

SHE is taking the class and wondered if it can be done. I told her "not unless you use Javascript or PHP", but she wanted a 2nd opinion.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |