title: Accessing current value of a form element in Drupal
body: <p>I have a field in a CCK node form that is hidden, and has a default value. What I'm trying to do is, when the user fills out the form, and submits it - I want to take the value of the hidden field and use it for a query.</p>
  
  <p>My question is, how can I get this value? In PHP/HTML the $POST variable can be used. But, how can I do this in drupal?</p>
  
  <p>I'm trying variations of this:</p>
  
  <pre><code>$form['#field_tst_timesheet']['value']
  </code></pre>
  
  <p>Anyone know how I can get at the value of this field?</p>
  
  <p><strong>Vfillby's answer:</strong></p>
  
  <p>Entering this:</p>
  
  <pre><code> $ts =  field_tst_timesheet['0']['value'];
   drupal_set_message($ts);
  </code></pre>
  
  <p>resulted in Parse error: syntax error, unexpected '[' ?</p>