title: Duplicate text from one textarea to another (hidden)
body: <p>I have two input textareas, and the second one is hidden. Is it possible to automatically duplicate text typed in the first textarea to to the second?</p>
  
  <p>So far I can think of 1) javascript, but not sure how to implement that. 2) do something with my forms in php:</p>
  
  <pre><code>$form['textarea1'] = array(
    '#type' =&gt; 'textarea',
    '#title' =&gt; 'title',
    '#rows' =&gt; 20,
    '#required' =&gt; TRUE,
  );
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$form['textarea2'] = array(
    '#type' =&gt; 'hidden',
    '#rows' =&gt; 20,
    '#required' =&gt; TRUE,
    '#default_value' =&gt; value from textarea 1?
  );
  </code></pre>
  
  <p>btw, it's Drupal.</p>
  
  <p>Thank you for any suggestions.</p>
  
  <p><strong>Update</strong>. The first form is being built by special module and it saves the data to it's own table instead of saving data to drupal system table (node_revisions). My module creates the second form to duplicate data to drupal system table.</p>