In some cases, you may not want visitors to use certain parts of your form. For example, you might want to disable a submit button until all the required fields have been filled out. Figure 17.58. Here, I use JavaScript and the disabled attribute to make the submit button inaccessible until other options are selected.
To disable a form element: In the form element's tag, type disabled="disabled". Figure 17.59. When the visitor first views the form, nothing is selected and the submit button is disabled.
Figure 17.60. When the visitor chooses an item, the submit button is no longer disabled (thanks to the JavaScript in Figure 17.58).
Tips
|