When a field's data containing "/" is submitted through a form and saved using Save Data on CCv6, the resulting entry in the database contains \ within the data. How do we stop this behaviour?
Eg user submits a form with field data "this/that", which is then saved into the database as "this\/that". When retrieved from the database, it returns the data as "this\/that" which does not correspond to user's entry.
Seems to happen if the field data is saved as an array (ie dropdown multiselect) but not when it's saved as a text input or single dropdown.
Eg user submits a form with field data "this/that", which is then saved into the database as "this\/that". When retrieved from the database, it returns the data as "this\/that" which does not correspond to user's entry.
Seems to happen if the field data is saved as an array (ie dropdown multiselect) but not when it's saved as a text input or single dropdown.
do you have the latest CF6 update installed ?
Yes, chronoform is on version 6.1.4.
However this is using Chronoconnectivity 6.
However this is using Chronoconnectivity 6.
Example debug. Code field is a dropdown with multi-select on:
Array
(
[save_data] => Array
(
[data] => Array
(
[code] => Array
(
[0] => C/D
)
)
[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `table` (`code`) values ('["C\/D"]');
)
[var] => Array
(
[code] => ["C\/D"]
)
)
)
when the data is returned in JSON format it has the slashes, but what happens when you JSON decode it ?
You need to login to be able to post a reply.
