Forums

JSON data

Paolo.Ferlini 10 Sep, 2014
Hi all,
i would like to store in a db cell a JSON value of an array of 10 elements, and when i retrieve it to split in 10 input box.

Can anyone suggest me how to do in CF/CC ?

Thanks a lot.

Paolo
GreyHead 10 Sep, 2014
Hi Paolo,

Use a Custom code action before you save it e.g.
<?php
$form->data['json_data'] = json_encode($form->data); 
?>
and to unpack
<?php
$form->data['some_data'] = json_decode($form->data['json_data'], true);
?>

Bob
This topic is locked and no more replies can be posted.