Forums

I can't use checkbox datas

Cali 10 Mar, 2011
I need to publish db data from chronoforms with chronoconnectivity: all it's allright except checkbox datas.
I've a chackbox field with a list of values between commas like that value1, value3, value5
When i use in the body connection view : {check0} the result is : value1, value3, value5 like in the db field

but when i wan't to use the result in a php function to print the 3 values separate it doesn't work :

$cats=explode(", ","{check0}");


with echo "{check0}"; the value is value1, value3, value5 so i can print the values only with the commas and i need to use it for print images.

how can i do to use my checkbox values ?
GreyHead 10 Mar, 2011
Hi Cali,

You can't use the {input_name} syntax in PHP, the ChronoConnectivity work-flow runs the PHP before the curly-code replace. Instead use $MyRow->input_name
$cats = explode(", ", $MyRow->check0);

Bob
Cali 10 Mar, 2011
It's ok, it work very well. After several hours on this problem, it's wonderful.

Thank you very much Bob.
This topic is locked and no more replies can be posted.