I've tried updating a few modules to the new forms_api now, and I get stuck at the same point every time. I update all the arrays, set up the new hook, and every time I end up with the following error:
Fatal error: Cannot create references to/from string offsets nor overloaded objects in $my_drupal_dir/includes/form.inc on line 312
Here's an example of an update of the forms_api for the Donations module:
<?php
// Implementation of hook_settings()
function donations_settings()
{
$url_donorge = D_URL_DONORGE;
$donorge = "Donorge";
global $base_url;
$site_name = variable_get('site_name', 'drupal');
$form["donorge_default_item_id"] = array(
'#type' => 'textfield',
'#title' => "What is the item ID of your donation item as listed on Donorge?",
'#default_value' => variable_get('donorge_default_item_id', 1),
'#size' => 10,
'#maxlength' => 10,
'#description' => "",
);
$d_adminblock = l("enable a donation block", "admin/block");
$default_block_subject = variable_get('donorge_block_subject', "support $site_name");
$output .= "Optionally you can $d_adminblock which will make it allot easier for your visitors to donate to your item via your own site. Typically you should always enable the donation block on your site unless you want to manually take care of the donation button on your site.";
$form["donorge_block_subject"] = array(
'#type' => 'textfield',
'#title' => "Title of the donation block (optional)",
'#default_value' => variable_get('donorge_block_subject', $default_block_subject),
'#size' => 40,
'#maxlength' => 80,
'#description' => "",
);
$form["donorge_block_text"] = array(
'#type' => 'textarea',
'#title' => "This text appears on top of the donation button in the donations block (optional)",
'#default_value' => $default_block_text,
'#cols' => 64,
'#rows' => 8,
'#description' => "",
);
for($i = 1; $i < 19; $i++)
$options[] = $i;
$form["donorge_button_id"] = array(
'#type' => 'select',
'#title' => "Select the look of the donation button",
'#default_value' => variable_get('donorge_button_id', 1),
'#options' => $options,
'#description' => "",
);
$output .= "
";
for($i = 1; $i < 10; $i++) {
$ii = $i + 9;
$output .= "
$i.  |
$ii.  |
";
}
$output .= "