Answers.Body: <p>Unfortunately it's a limitation of the Webform module (not specific to Civi) that hidden fields cannot be accessed as tokens or from hooks. They <em>might</em> be available in the $_POST superglobal, but only immediately after submitting page 1 (e.g. not after returning to page 2 from page 3, or from a saved draft, or from reloading page 2 with validation errors). Since you are writing php code, consider using the CiviCRM API to fetch this info instead.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-02T16:01:53.437Z
Answers.Text: Thanks, I didn't see your answer in time, and ended up copying the disabled value to a hidden field. CiviCRM API would clearly have been a better way to go.
Answers.UserDisplayName: Tenz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-02T01:56:47.977Z
Answers.LastActivityDate: 2015-05-02T01:56:47.977Z
Answers.UserDisplayName: Coleman
Body: <p>I have 2 radio buttons whose values I can access on page 2 using $form_state['input']['submitted']['nameoffield'] when the field is not conditionally hidden. When conditionally hidden however (and pre-filled) I can't access the value, presumably because the field is disabled. What is the best way to access a pre-filled civicrm value on the second page of the webform?</p>
  
Tags: <webform-civicrm>
Title: How to get the value of a disabled form field in webform civicrm?
ThreadText: # How to get the value of a disabled form field in webform civicrm?
  
  (Asked by: username_0 on 2015-05-01)
  
  I have 2 radio buttons whose values I can access on page 2 using $form\_state['input']['submitted']['nameoffield'] when the field is not conditionally hidden. When conditionally hidden however (and pre-filled) I can't access the value, presumably because the field is disabled. What is the best way to access a pre-filled civicrm value on the second page of the webform?
  
  **Tags:** webform-civicrm
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-02. Score: 2 | Accepted answer
  
  Unfortunately it's a limitation of the Webform module (not specific to Civi) that hidden fields cannot be accessed as tokens or from hooks. They *might* be available in the $\_POST superglobal, but only immediately after submitting page 1 (e.g. not after returning to page 2 from page 3, or from a saved draft, or from reloading page 2 with validation errors). Since you are writing php code, consider using the CiviCRM API to fetch this info instead.
  
  > **Comments:**
  > **username_0**: Thanks, I didn't see your answer in time, and ended up copying the disabled value to a hidden field. CiviCRM API would clearly have been a better way to go.  
  
  ---
  
  