Hello
I have a contact form here: Link
If a user does not complete a field, a red text message appears onscreen. And that appears quite neatly. But if all fields are missed as in the attachment in this link: Link
the page looks untidy and disorganised.
What would be the best way - I prefer to avoid pop-ups - of displaying these errors neatly, please?
The code looks like this:
Thanks!
I have a contact form here: Link
If a user does not complete a field, a red text message appears onscreen. And that appears quite neatly. But if all fields are missed as in the attachment in this link: Link
the page looks untidy and disorganised.
What would be the best way - I prefer to avoid pop-ups - of displaying these errors neatly, please?
The code looks like this:
Code:
If Not IsValidEmail(email) Then
errorCount = errorCount + 1
Response.Write "<span style=""color:red"">[b]You did not enter a valid email address.<br>Please enter a valid Email address[/b]<br></span><br>"
End If
If name = "" Then
errorCount = errorCount + 1
Response.Write "<span style=""color:red"">[b]You did not enter a Name.<br>Please complete the Name field[/b]<br></span><br>"
End If
If message = "" Then
errorCount = errorCount + 1
Response.Write "<span style=""color:red"">[b]You did not enter a Message.<br>Please complete the Message field[/b]<br></span><br>"
End If
If errorCount = 3 Then
Response.Write "<span style=""color:red"">[b]You have not completed any fields. <br>Please complete all fields[/b][b][/b]<br></span><br>"
End If
Thanks!