WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • Mpform with smileys and emojis
  • Print
Pages: [1]   Go Down

Author Topic: Mpform with smileys and emojis  (Read 7517 times)

Offline netraam

  • Posts: 47
Mpform with smileys and emojis
« on: January 18, 2023, 09:41:39 PM »
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
Logged

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 601
Re: Mpform with smileys and emojis
« Reply #1 on: January 19, 2023, 01:08:47 AM »
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
Logged

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: Mpform with smileys and emojis
« Reply #2 on: January 19, 2023, 07:35:22 AM »
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
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 608
  • Gender: Male
    • meine Homepage
Re: Mpform with smileys and emojis
« Reply #3 on: January 27, 2023, 10:20:45 PM »
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...)
Logged

Offline netraam

  • Posts: 47
Re: Mpform with smileys and emojis
« Reply #4 on: February 07, 2023, 04:02:45 PM »
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: [Select]
echo "<script>
$('.mpform_submit').on('click', function () {
  removeInvalidChars();
});

function removeInvalidChars() {
  var str = $('#field7').val();
  str = str.replace(/[^\x20-\x7E]/g, '');
  $('#field7').val(str);
}
</script>";
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • Mpform with smileys and emojis
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2