API page: https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen...

lost 2 days on the FAPI

finally discovered that stored data in as a #type "hidden" means i get the data back in my $form_state['input'] on repeat calls to myform_form()

putting data in as a #type "value" does not send the data back in $form_state - presumably (haven't looked) its post in the form so available to js (???)

anyhoo.... seems like the distinction between

form_state['storage'] (which i couldnt get to return at all for some reason)

and a form element #type "hidden" and "value" could be clarified...

love all your work

please dont rush with drupal 8 :-)

Comments

jhodgdon’s picture

Project: Drupal core » Documentation
Version: 7.x-dev »
Component: documentation » API documentation files
Category: Feature request » Bug report
Status: Active » Postponed (maintainer needs more info)
Issue tags: -multistep +FAPI reference

Hm. The documentation for type hidden on the FAPI reference already says:

Description: Store data in a hidden form field.

And the documentation for type value says:

Description: A form value that is internal to the form and never displayed to the screen.

I am not sure how we could make that more clear... it seems pretty clear to me?

In any case, the FAPI reference is in the Documentation project git repository, so moving the issue there.

jhodgdon’s picture

Just as a note, we took care of this for Drupal 8 on
#2486993: Document Hidden Form Elements
Leaving this open for Drupal 7.

jhodgdon’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No response in 3 years, closing.