Posts: 14
Threads: 3
Joined: Dec 2010
Reputation:
0
Hi All,
I have a working form that if a user types a symbol (@#$®) the symbol and all text thereafter is missing. If I go directly to the my-sql database and input the same text with symbol intact, everything is fine and all the text is captured. This is a product description area and requires the ® symbol as well as others.
I thanks you all for any help you can offer. This is a live form, so time is limited.
Thanks.
J-Mac
Posts: 90
Threads: 30
Joined: Mar 2010
Reputation:
1
Hi jmac,
This might happen because encoding of form is different from encoding of your database.
You need to have same encoding in database and in form. Try utf-8 as form encoding.
Encoding of form is set in metatag in the header of your form document:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Please check if this is solving your problems...
Cheers,
Hannes
Posts: 14
Threads: 3
Joined: Dec 2010
Reputation:
0
Hi Hannes,
That was it. The form was encoded wrong.
Thanks.
Posts: 6
Threads: 1
Joined: Aug 2011
Reputation:
0
(Feb 7th, 2011, 5:03 PM)jmac1515 Wrote: Hi Hannes,
That was it. The form was encoded wrong.
Thanks.
This same issue is actually happening to me. Specifically it was the less than symbol that caused the rest of the text entered into that field to simply get cut off. I have the meta tag properly set to utf-8, so I really don't know what the problem could be. Does anyone have any thoughts?
Thank you.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Donia,
Interesting. The less than sign is used in HTML, and by default (for security reasons), Form Tools strips out all HTML in form fields. Maybe try temporarily disabling it to see if the submission data all gets through.
To change it, in the Form Tools admin area go to Forms -> Edit Form -> Main tab -> and change the "Strip tags in form submissions" to "no".
Failing that, it's possible that the data was being uploaded properly, but it's just not being *displayed* properly.
But let me know if the above solution fixes it!
- Ben
Posts: 6
Threads: 1
Joined: Aug 2011
Reputation:
0
Thank you so much! That was the problem! I had switched to UTF-8 specifically to allow unusual characters, like the combination less than/equal symbol, but could not figure out why just a less than symbol (which is a standard character) wouldn't work.
Thank you again, for the help and the quick response. I really appreciate it.
Donia
Posts: 6
Threads: 1
Joined: Aug 2011
Reputation:
0
(Aug 11th, 2011, 10:16 AM)donia Wrote: Thank you so much! That was the problem! I had switched to UTF-8 specifically to allow unusual characters, like the combination less than/equal symbol, but could not figure out why just a less than symbol (which is a standard character) wouldn't work.
Thank you again, for the help and the quick response. I really appreciate it.
Donia
It turns out this did not fix the problem entirely. The form is now allowing HTML tags, but still truncating when it hits other characters. I believe the characters causing problems are Microsoft Word special characters, such as the long dash, combination greater than/equal to sign, etc. This is really a big problem for my users, so any help is greatly appreciated.
Thank you.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Donia,
So when you look in the database fields directly, it's been truncated there? Or just when displayed in the interface?
- Ben
Posts: 6
Threads: 1
Joined: Aug 2011
Reputation:
0
(Aug 22nd, 2011, 9:19 AM)Ben Wrote: Hi Donia,
So when you look in the database fields directly, it's been truncated there? Or just when displayed in the interface?
- Ben
It is truncated in the database. The thing is, when I enter something with special characters into the form, it processes it correctly. I've even taken their Word document, which has the special characters in it and causes the field to truncate, and submitted it myself. It works. It makes me think their browsers are not interpreting the form as UTF-8, even though I have the proper header.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Strange!
Maybe quickly confirm it's nothing on Form Tool's end: check your library.php file has the $g_unicode setting set to true, and that it isn't overridden in the config.php. Unlikely! But worth a quick check.
Beyond that, I see you've added the UTF-8 charset to the page... maybe also add it to the form by adding the following attribute:
Code: <form ... accept-charset="UTF-8">
I don't see why it would be necessary though... maybe something on your server is preventing the form POST being sent in UTF-8...?
- Ben
|