form help

Results 1 to 2 of 2

Thread: form help

  1. #1
    geeoff Guest

    Default form help

    My website requires that users fill out a form (input.asp). We are moving towards server-side validation of the data entered. Input.asp posts to itself so that the user can see any errors that they may have made and correct them. However, since all the fields are blank when the page first loads all the errors display. How can I stop the errors from displaying the first time the user enters the page?? i.e. show them only after the submit button is pressed.

  2. #2
    Join Date
    Dec 1969

    Default RE: form help

    One way of doing this is to set a variable intError = 0 or false. After the submit button is pressed (ie. If Request.Form("NameOfButton") = "ValueOfButton" Then) check for validation. If a form element comes up invalid set the variable intError = 1 or true. Then on the display page say If intError = 1 or true ...write your error message. Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts