I'm working on a module in Drupal 7. I have three different forms set up with hook_form. I would like to display the three forms on one page along with some html to organize the forms and apply some css to change the look a little bit. What I have right now is:
function floormap_setup_page() {
$info[0] = '<div id="floormap_setup">';
$info[0] .= '<div id="select_floormap">';
$info[0] .= '<ul>';
$floormap_options = get_floormap_options();
$floormap_list = '';
foreach ($floormap_options['name'] as $key => $value){
$span_delete = '<span class="delete"><a href="#"> ' . t('Remove Floor Map') . ' </a></span>';
$span_default = '<span class="default"><a href="#"> ' . t('Make Default') . ' </a></span>';
$floormap_list .= '<li>' . $value . $span_default . $span_delete . '</li>';
}
$info[0] .= $floormap_list;
$info[0] .= '</ul>';
$info[0] .= '<div><!--select_floormap-->';
$info[0] .= '<div id="label_cameras">';
$info[1] = drupal_get_form('setup_cameras_form');
$info[2] = '</div><!--label_cameras-->';
$info[2] .= '<div id="set_expectations">';
$info[3] = drupal_get_form('set_expectations_form');
$info[4] = '</div><!--set_expectations-->';
$info[4] .= '<div id="new_floormap">';
$info[4] .= '</div><!--new_floormap-->';
$info[4] .= '</div><!--floormap_setup-->';
return $info;
}
Doing this displays the page how I want it, the only problem is that I get a bunch of errors along with it..
The errors look like this:
Warning: Illegal string offset '#children' in drupal_render() (line 5887 of /var/www/app.local.nucloudglobal.com/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5897 of /var/www/app.local.nucloudglobal.com/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5935 of /var/www/app.local.nucloudglobal.com/includes/common.inc).
Warning: Illegal string offset '#printed' in drupal_render() (line 5942 of /var/www/app.local.nucloudglobal.com/includes/common.inc).
The entire set of errors repeats for each item in the $info array.