This component is similar to a WOTextField and needs to be placed within a WOForm. When the user clicks on one of the form’s submit buttons, the text in the field is tested according to the following rules:
If inputIsRequired is set to YES, the text must not be the empty string.
If requiredText is not the empty string, the text must contain it.
If the text conforms to these rules, JSValidatedField submits the form. Otherwise it displays a message and does not submit the form. This elements JavaScript only fires if a user tabs to a field before submitting the form. If a particular field is never tabbed in to, the JavaScript isn’t inovked on that field.
JSValidatedField { inputText=aVariable; errorMessage=aString; formName=aString;
[fieldSize=fieldSize;] [inputIsRequired="YES"|"NO";] [requiredText=requiredText;] };
The variable into which the entered data is stored.
The message to display if the validation fails.
The name of the form that contains the JSValidatedField.
Specifies the width of the text field.
If YES, this field must be nonempty before JSValidate Field allows the user to submit the form.
A string that the entered text must contain before JSValidateField allows the user to submit the form.
Last updated: 2004-12-02