return theme_checkbox(array(
'title' => 'Title', 
'value' => FALSE,  
'return_value' => 25,  
'description' => 'Test',  
'required' => FALSE
));

Why this code throws me the "warning: implode() [function.implode]: Invalid arguments passed" error?

Thanks

Comments

Druupdruup’s picture

It's been a long while since the opening of this thread, but I was experiencing the same problem and found the solution after some debugging.

When using the theme_checkbox a references to the parent form is required. You have to set the #parents attribute. A little example:

theme_checkbox (
array (
"#id" => "one",
"#parents" => array(form][fieldset]")
)
)

Keep in mind that #parents must to be an array (as far as I noticed).

Some info about #parents can be found here.

jaypan’s picture

Calling theme_checkbox() is incorrect. Themeing functions should be called with the theme() function, and in this case, it would be theme('checkbox', $element);

Contact me to contract me for D7 -> D10/11 migrations.