WebsiteBaker Support (2.13.x) > Modules
Mpform with smileys and emojis
(1/1)
netraam:
Hello,
i'm using Mpform for several years. now I have version 1.3.22.
Tha last couple of years the people are using more and more smileys and emojis.
But when they send a form with a emojis Mpform can't save it to the database it just sends me an email.
Is there a simple solution for this? I dont mind if the smiley disapear I just want it to save the form in the database.
thanks in advance
Maarten
sternchen8875:
what is the collation for the mpform-database-tables? Emoji's need utf8mb4. Maybe, thats the solution, but i've never use emoji's in a formular
hgs:
The current version of mpForm is 1.3.43 and available for download here
But the current versions are also adapted to the current php version and the current WebsiteBaker Version
Martin Hecht:
Is the problem still there, when you swith to the latest version of mpform? Can it be solved by converting the database tables? (make a backup before running experiments...)
netraam:
In the meantime i found a solution.
I've added a section to the page of the mpform.
The extra section is a code module where i've wrote a script that remove all Non-ASCII characters from my large textfield (in my case field #7).
The script is executed when you click on the send button.
--- Code: ---echo "<script>
$('.mpform_submit').on('click', function () {
removeInvalidChars();
});
function removeInvalidChars() {
var str = $('#field7').val();
str = str.replace(/[^\x20-\x7E]/g, '');
$('#field7').val(str);
}
</script>";
--- End code ---
Navigation
[0] Message Index
Go to full version