Forums

Accented characters do not validate - form can't be submited

jmkaep 25 Jun, 2010
I am using Chronoforms using Mootols with Joomla 1.5 on a bilingual site.

I have 2 forms with validation on each form field.

When the user enters an accented character like é or è in the entry the field does not validate either as alpha or alpha num and the form does not post.

I'm poking around - here's what I found:

should the pattern in the javascipt be changed to [a-zA-ZÀ-ÿ ]+$/, to include the additional characters?

I changed in:
components\com_chronocontact\js\mooValidation.js
and
components\com_chronocontact\js\jsvalidation2.js

but nothing happened.

Any help is appreciated.
jmkaep 25 Jun, 2010
Well ya big dummy, you were on the right track but you had to go a bit further.

Use the Firefox developer plugin the show the javascripts that loaded with the form an then edit expressions to add the additional character range.

And oh yes, make sure the encoding is utf-8 in your editor.

Anybody have any comments - am I on the right track?
GreyHead 26 Jun, 2010
Hi jmkaep,

Personally I'd use a custom validation rather than hack the code but either will work.

Bob
jmkaep 26 Jun, 2010
How do you do that?

I couldn't find anything in the chronoforms interface to do that. I am not a programmer.

Hacking the sitewide validation script also changes the validation for the Joomla account creation form ie the usernames and passwords can contain accents. Is that a security risk?
This topic is locked and no more replies can be posted.