This is a similar example but in this case the Maiden Name field
is removed or added to the display based on the gender selection.
Applet Source
In this example, the Phone Number field is checked for numeric characters
and length based on the Choice selection of Local or Long Distance. The
validation is done when the Choice is changed or the Validate button is
clicked.
Applet Source