"/>
 

Resources

SAS® AppDev Studio 3.0 Developer's Site

Form Elements: Client-Side Validation   About It Build It  

This example shows an HTML form with various form elements.

An HTML form is a section of a document containing normal content, markup, special elements called controls (check boxes, radio buttons, menus, and so on), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, and so on), before submitting the form to an agent for processing (for example, to a Web server or to a mail server.)

This example will also demonstrate setting up client-side validation using the RequiredStringValidator in the com.sas.servlet.tbeans.util.validators package.

See It

Form with various form elements

Here is the image that will be used in the example.

House Logo

How It Works

The Form TransformationBean generates the appropriate HTML 4.0 and JavaScript for creating a Form. The Form element tags are placed within the Form tag to accept input and display the data. In order for validation to work properly, a call must be made to the addComponent() method on the form to add the form element that validation has been set on.

When the form is submitted, the results from the search will be displayed.