Forums

checkbox group and dynamic data

emmexx 27 Feb, 2014
I get the following error when viewing a form with a checkbox group that takes data from a db read action:

Warning: array_combine() expects parameter 1 to be array, null given in mysite/administrator/components/com_chronoforms5/chronoforms/actions/html/html.php(113) : eval()'d code on line 6 


Line 113 is:
eval('?>'.$form->form['Form']['content']);


I setup the DB read and the checkbox group as usual (in CF v4), I don't understand if I'm doing something wrong.

Thank you
maxx
GreyHead 27 Feb, 2014
Hi Maxx,

It's a PHP Warning, not an Error, you can hide them by setting Error Reporting to System Default or none in the Site Global Configuration.

The Warning comes from Line 6 of the code that is being evaluated. I'm not sure what is in the ['content'] parameter - perhaps the Form HTML?

Bob
emmexx 27 Feb, 2014



It's a PHP Warning, not an Error, you can hide them by setting Error Reporting to System Default or none in the Site Global Configuration.

The Warning comes from Line 6 of the code that is being evaluated. I'm not sure what is in the ['content'] parameter - perhaps the Form HTML?



Bob, you're right, it's a warning. The problem is I don't get any checkbox in the form. Sorry, I forgot to mention that in my OP.
There are at least 10 records returned by the DB Read (I can see them in the Debugger) but no checkbox.

I see them as:
[tags] => Array
        (
            [0] => Array
                (
                    [title] => ROOT
                    [id] => 1
                )

            [1] => Array
                (
                    [title] => bi1
                    [id] => 2
                )
...


In the checkbox group options I entered tags as Data path, title as text key and id as value key.

Thank you
maxx
GreyHead 01 Mar, 2014
Hi maxx,

I'm sorry, I have no idea how Max has handled array values in ChronoForms v5. Please ask him using the Contact Us menu above and link to this thread.

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