Maintaining form data when validations fail

When a form is submitted to the web server for validation, a validation error may necessitate reloading the form page to display the error and provide the user the opportunity to make changes and re-submit the form. However, once the page reloads, there are no automatic placeholders that will maintain data within the form that did pass the validation, this forcing the user to fill the form out again from scratch.

WA Validated Entries are data bindings that can be applied to form elements so that data that passes validation can be re-populated into the form in the event of an error, thereby saving the user the trouble of entering the data twice.

When the Server Validation server behavior is applied to a page, all form elements for that given page automatically have a data binding created within Dreamweaver within the Bindings panel. It is only necessary to apply the appropriate binding to the value tag of that form element.

To maintain a validated entry for a form element:

  1. Open a page which contains a form and a corresponding application of the Server Validation server behavior.
  2. In the Bindings panel, select the WA Validated Entries binding that correlates to a form element on the page.
  3. Drag that binding to the corresponding form element on the page in Design View.

    The initial value of the form element is populated by a variable string that maintains the state of that form element if server validation fails.