Forums

special characters in email address

ojas 14 Dec, 2011
Hi,

I am using chronoforms 4.0 RC2. Its a great component. But I have one problem.

I have a email textbox field in the form where user can input their email address. After submit, all the special characters in the email address get removed. e.g. [email]xyz@gmail.com[/email] becomes xyzgmailcom. We get the form data mailed and also stored in the database.

Please help me with this problem.

Thank You.
---Ojas
ojas 15 Dec, 2011
Please provide any solution...
GreyHead 15 Dec, 2011
Hi Ojas,

I've no idea, I've never seen this before. I can only guess that something in your form or server settings is removing the @ :-(

Bob
ojas 17 Dec, 2011
Hi Bob,

i found out that, if i use chronoforms in module position of yougrid free template then this problem of @ character occurs. 😟 😟
Please try this and help me with it.

Ojas
GreyHead 17 Dec, 2011
Hi Ojas,

I installed the YouGrid template and can confirm that it strips the @ from the Form data in the module position (but not from the form view). The post data is submitted correctly from the Form but then edited somewhere in the submission process. I find this a bit odd :-(

I can only suggest that you take it up with the You Joomla!

Ah! I did a search of the template files and found these lines near the beginning of yjsg_core.php. It looks as though they could be the cause of the problem:
// XSS PROTECTION
$_GET = preg_replace("|([^\w\s\'])|i",'',$_GET);
$_POST = preg_replace("|([^\w\s\'])|i",'',$_POST);


If you change the last line to
$_POST = preg_replace("|([^\w\s\@'])|i",'',$_POST);
then the email address is saved correctly.

Bob
ojas 17 Dec, 2011
Hi Bob,

It worked. Thank You so much!! 😀 😀
The problem was not from yourside i.e. from chronoforms, then also you helped. You are a great guy!!!

Ojas
This topic is locked and no more replies can be posted.