Forums
This topic is locked
Filtering form fields (news, cms, etc.)
Posted 31 Jul 2006 15:46:47
1
has voted
31 Jul 2006 15:46:47 Christian Houmann posted:
In order to make my pages xhtml compliant, I have to filter the danish characters, when a record is inserted/updated.I found the place in the insert (shown below <b>update</b> generated code (the bold text is my replace function):
If (MM_altVal <> "" Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'" Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''" & "'"
<b>
'Change danish characters in formfields
MM_formVal = replace(MM_formVal,"""","”"
MM_formVal = replace(MM_formVal,"æ","æ"
MM_formVal = replace(MM_formVal,"ø","ø"
MM_formVal = replace(MM_formVal,"å","å"
MM_formVal = replace(MM_formVal,"Æ","Æ"
MM_formVal = replace(MM_formVal,"Ø","Ø"
MM_formVal = replace(MM_formVal,"Å","Å"</b>
It works fine, and even though I have made a snippet with the code, I still have to remeber putting it in, every time a use the insert/update behavior.
Question:
Is it possible to make Dreamweaver do this function as standard, every time I use the behavior?
(I suppose it is, but have never "played" with extension development...)