Hello, i have formit forms and i gave access to users so they can edit them.
Whenever a user clicks save to update his form i am making 2 mysql queries
The first is in the formit table:
$sql = $modx->query("
UPDATE `modx_formit_forms`
SET `values` = '$valuesjson'
WHERE id='$formid'
");
The second is in a custom table
$sql2 = $modx->query("
UPDATE `modx_users_forms`
SET `body` = '$valuesobject->body',
`initial_images` = '$IMAGES_TO_SAVE'
WHERE formid='$formid'
");
In both tables im adding greek characters but only in the custom table the greek chars are stored correctly in the formit table the greek chars are saved like below (see name and body field):
{
“name”:“This is a test ignore u03b4u03bau03c6u03c3u03bau03c6u03c3u03bau03c6u03bbu03c3 u03b4u03bau03c6u03bcu03bbu03bau03c3u03c6u03bcu03c6”,
“body”:“dfsfsfsf u03c6u03bbu03c3u03c6u03beu03c3u03bau03c6u03c3u03bau03beu03c6u03bdu03c3u03bau03beu03c6u03bdu03c3u03c6”,
“imagesQueue”:“0”,
“imagesLinks”:"",
“imagesLinksTOREMOVE”:"",
“file”:"",
“tk”:"",
“odos”:"",
“other_area_info”:"",
“datewhat”:“03/09/2019”,
“other_testimony_info”:"",
“image”:""
}
The only differnce in the 2 tables is that formit VALUES fields stores multiple fields in json format and in the custom table am just updating a single field.
So i know that the problem is related to how formit handles this field
Any help?