I have the multi field checkbox element on my form. And have the variable, getting from url.
I want to create the checkbo items with its labels which depend on this variable using custom php or javascript code.
How i can create checkbox item or its label by dynamically?
Hi s.elena133,
Please replace for each with foreach (no space) - sorry about that. If that doesn't fix the problem please post the full error message here.
Bob
Hi, Bob
Many thanks for your answers.
It is not your mistake. I was very inattentive by myself. When I did, the error is gone. But the main problem lies elsewhere.
When i enable the dynamic data (tab "dynamic data" for my checkbox group ) the other error is appear:
"Warning: array_combine() expects parameter 1 to be array, null given in Z:\home\site-selena\www\administrator\components\com_chronoforms5\chronoforms\actions\html\html.php(263) : eval()'d code on line 27"
If i disable this option this error is disappearing.
Hi s.elena133,
As far as I can see that line in the html.php file is evaluating the main form content. Please can you check the Code tab and see what there is around line 27.
Note that this is just a PHP Notice and is annoying but harmless. Setting the site Error Reporting to System Default or to None should hide it.
Bob
Oh, sorry
I forgot, on dynamic data tab of my checkbox group are options:
Enable dynamic data: Yes
Data path: boxes
Key value: value
Text key: text
Hi s.elena133,
I do not see an array_combine() function anywhere in that piece of code?
Bob
Hi Bob,
I'm too.
It can be such an array with "Key value: value" and "Text key: text" (from dynamic data tab)? And my massive is not correctly for it ("1 parametr, but null given")
Error appear when i enable "dynamic data" and disappear when i disable it (but code does not work too, of course)
Hi s.elena123,
The message says "Warning: array_combine() expects parameter 1 to be array, . . ." So there should be an array_combine() function call in the code somewhere.
By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob
Hi Bob,
I'd like to, but this site is on the local server (denwer).
Tomorrow I'll try to replicate settings on another site on the hosting and import the form to, then I'll send to you my login and password.
Thank you so much.