Textarea not populating with previous value So I have been buildign a simple form used to populate a block on the sidebar of my drupal 7 site. However I have run into a problem, the textarea on this form does not seem to populate with the sidebars previous value. 

What has me stumped is that a textfield with the same defaultvalue code populates correctly.

//a debug textfield that works     
$form['debug'] = array(
    '#type'        =&gt; 'textfield'
       ,'#title'       =&gt; 'Debug'
       ,'#default_value' =&gt; $sidebar_content[$key] ? $sidebar_content[$key] : ''
       ,'#description' =&gt; t('Please enter a suitable heading for the left sidebar.')
     );

//the broken textarea   
 $form['body'] = array(
        '#type' =&gt; 'textarea'
        ,'#title' =&gt; t('Body')
        ,'#rows' =&gt; 15
        ,'#description'   =&gt; t('Body text for sidebar')
        ,'#value' =&gt; $sidebar_content[$key] ? $sidebar_content[$key] : ''
    );


Edit: After disabling WYSIWYG the text area started populating again. More digging revealed the reason it wasn't populating as a rich text box was because when an editor is used it submits the value as an array with two items; value and format. Consequently, this meant that the text editor was being given an array to display rather than a string. 

Altering the #default_value to $sidebar_content[$key]['value'] resolved this issue.
After disabling WYSIWYG the text area started populating again. More digging revealed the reason it wasn't populating as a rich text box was because when an editor is used it submits the value as an array with two items; value and format. Consequently, this meant that the text editor was being given an array to display rather than a string.

Altering the #default_value to $sidebar_content[$key]['value'] resolved this issue.