P
Padito
How can you alter the wording of the Form validation error message?
Padito said:How can you alter the wording of the Form validation error message?
Trevor L. said:Padito said:How can you alter the wording of the Form validation error message?
I am very much a beginner in use of ASP, but I found that when I added an
update to DB ASP module using the DBIW, this code was generated:
FP_FormConfirmation "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"add_to_guestbook.asp",_
"Return to the form."
' FP_FormConfirmation parameters are:
' szCharset (html character set) , szTitle (title) ,
' szmsg1 (confirmation message),
' szUrl (return URL), szMsg2 (return message)
The comments above (lines starting in ') are mine.
The function called is:
Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
On Error Resume Next
Response.Write "<html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<meta http-equiv=""Content-Type"" content=""" & szCharSet
& """>" & vbCrLf
Response.Write "<title>" & szTitle & "</title>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "<h1>" & szTitle & "</h1>" & vbCrLf
Response.Write "<p>" & szMsg1 &"</p>" & vbCrLf
Response.Write "<p>" & vbCrLf
For Each item in Request.Form
If item <> "VTI-GROUP" Then
Response.Write "<b>" & item & "</b>" & ": " &
FP_EncodeOutput(Request.Form(item)) & "<BR>" & vbCrLf
End If
Next
Response.Write "</p>" & vbCrLf
Response.Write "<p><a href=""" & szUrl & """>" & szMsg2 & "</a></p>" &
vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.End
End Function
So I guess the parameter to alter is the 3rd one, szmsg1:
"Thank you for submitting the following information:"
If you want a multi-line message, try adding <br/> as a line break
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
Padito said:Thanks for the help - but I am afraid I you lost me!!
I am not versed in ASP. What I am trying to achieve is to make the
filling in of the information" * Required" on this
page."http://untiemytv.com/Choice.htm". I can produce an error
message stating that they must add 1 or more letters but I want to
say they must fill in the information. Hope this explains my request?
Trevor L. said:Padito said:Thanks for the help - but I am afraid I you lost me!!
I am not versed in ASP. What I am trying to achieve is to make the
filling in of the information" * Required" on this
page."http://untiemytv.com/Choice.htm". I can produce an error
message stating that they must add 1 or more letters but I want to
say they must fill in the information. Hope this explains my request?
Sorry about that
I thought that form validation created ASP which one can view and
therefore edit, but as I say, I am also new to ASP, and have never used
the Form Validation
Anyway,
1. I hope someone with more knwoledge can answer
2. I will try to see what the code does (for my interest as much as
yours). If I succeed, I will post back
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
Trevor L. said:Padito said:How can you alter the wording of the Form validation error message?
I am very much a beginner in use of ASP, but I found that when I added an
update to DB ASP module using the DBIW, this code was generated:
FP_FormConfirmation "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"add_to_guestbook.asp",_
"Return to the form."
' FP_FormConfirmation parameters are:
' szCharset (html character set) , szTitle (title) ,
' szmsg1 (confirmation message),
' szUrl (return URL), szMsg2 (return message)
The comments above (lines starting in ') are mine.
The function called is:
Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
On Error Resume Next
Response.Write "<html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<meta http-equiv=""Content-Type"" content=""" & szCharSet
& """>" & vbCrLf
Response.Write "<title>" & szTitle & "</title>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "<h1>" & szTitle & "</h1>" & vbCrLf
Response.Write "<p>" & szMsg1 &"</p>" & vbCrLf
Response.Write "<p>" & vbCrLf
For Each item in Request.Form
If item <> "VTI-GROUP" Then
Response.Write "<b>" & item & "</b>" & ": " &
FP_EncodeOutput(Request.Form(item)) & "<BR>" & vbCrLf
End If
Next
Response.Write "</p>" & vbCrLf
Response.Write "<p><a href=""" & szUrl & """>" & szMsg2 & "</a></p>" &
vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.End
End Function
So I guess the parameter to alter is the 3rd one, szmsg1:
"Thank you for submitting the following information:"
If you want a multi-line message, try adding <br/> as a line break
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
Andrew said:Trevor, if the ASP below was generated by Frontpage, you might find
that altering the message will not save, and FP will reject the save
request saying it was generated by a FP component, and will return to
the original code, and not save your changes.
Trevor L. said:Hmm,
I will have to try it and see.
Isn't there a way to create/amend code that FP does not alter ?
(I am sure that I did this at one time)