Developer forum

Forum » CMS - Standard features » Limit the charset on forms

Limit the charset on forms

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Ihave a situation where I need to restrict the from from accepting Cyrillic (or any other special type of characters) from being saved in.

I have found something that seems to solve this by specifiying an accep-charset on the form. Something like: accept-charset="ISO-8859-1"

I was wondering if this is supported somehow by DW forms without having to manually edit every template.

In some cases (I believe a lot of them) we are using StartForm and EndForm tags and that makes it more complicated to mess with the forms.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hm, cannot figure out what that attribute does reading the docs. Never heard of it :-).

But you can set it using document.getElementById("myForm").acceptCharset = "";

Votes for this answer: 1
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

It was a surprise for me as well.

I have found it here: https://www.w3schools.com/tags/att_form_accept_charset.asp

I guess I can follow your solution.

Thank you very much.

Adrian

 

You must be logged in to post in the forum