Skip to main content
added 16 characters in body; edited title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

how to How do I access the #defult_value"#default_value" property from the form_state[values]$form_state['values']

iI am trying to get the #default_value"#default_value" property of a form element that is embedded in a fieldset.

The problem is that in my code, i I know the element name only, but iI do not know the element fieldset in which it resides.... isIs there a mechanism to fetch that out without having to search up and down the $form$form array to find in which fieldset my element resides, and then getgetting it using $form['someFieldset']['myElement']['#default_value']$form['someFieldset']['myElement']['#default_value']?

how to access the #defult_value from the form_state[values]

i am trying to get the #default_value of a form element that is embedded in a fieldset.

The problem is that in my code, i know the element name only, but i do not know the element fieldset in which it resides.... is there a mechanism to fetch that out without having to search up and down the $form array to find in which fieldset my element resides and then get it using $form['someFieldset']['myElement']['#default_value']?

How do I access the "#default_value" property from $form_state['values']

I am trying to get the "#default_value" property of a form element that is embedded in a fieldset.

The problem is that in my code I know the element name only, but I do not know the element fieldset in which it resides. Is there a mechanism to fetch that out without having to search up and down the $form array to find in which fieldset my element resides, and then getting it using $form['someFieldset']['myElement']['#default_value']?

Source Link
fawzi
  • 11
  • 1

how to access the #defult_value from the form_state[values]

i am trying to get the #default_value of a form element that is embedded in a fieldset.

The problem is that in my code, i know the element name only, but i do not know the element fieldset in which it resides.... is there a mechanism to fetch that out without having to search up and down the $form array to find in which fieldset my element resides and then get it using $form['someFieldset']['myElement']['#default_value']?