title: drupal form textfield #default_value not working
body: <p>I am working on a custom module with multi-page form on drupal 6. 
  I found that #default_value is not working when my '#type' => 'textfield'. 
  However, when '#type'=>'textarea', it displays correctly with the '#default_value' specified. </p>
  
  <p>Basically, I wrote a FormFactory to return different form definition ($form) based on the post parameter received. Initially, it returns the display of directories list, user then selects from radio buttos until a specific directory contains a xml file, it will become edit form. The edit form will have text fields display the data (#default_value) inside the xml file, however the type 'textarea' works here rather than 'textfield'.   </p>
  
  <p>How can I make my '#default_value' work in this case?</p>
  
  <p>Below is the non-working field definition:</p>
  
  <pre><code>$form['pageset']['newsTitle'] = array(
                                        '#type' =&gt; 'textfield',
                                        '#title' =&gt; 'News Title',
                                        '#default_value' =&gt; "{$element-&gt;newsTitle}",
                                        '#rows' =&gt; 1,
                                        '#required' =&gt; TRUE,
                                        );
  </code></pre>
  
  <p>Then I changed it to textarea as shown below to make it work:</p>
  
  <pre><code>$form['pageset']['newsTitle'] = array(
                                        '#type' =&gt; 'textarea',
                                        '#title' =&gt; 'News Title',
                                        '#default_value' =&gt; "{$element-&gt;newsTitle}",
                                        '#rows' =&gt; 1,
                                        '#required' =&gt; TRUE,
                                        );
  </code></pre>