The docs here:
http://api.drupal.org/?q=api/file/developer/topics/forms_api.html/
say that #type=>'value' variables are hidden without being sent to the browser. It also says "many developers immediately find themselves asking the question of "where does my data get stored?". The answer is simply that it doesn't. " It doesn't appear to get stored in the sessions table, which would agree with that comment- but it has to go somewhere if it's not part of the client-side HTML form.
So what is the non-simple answer? I have a working form with #type=>'value', but am concerned about how drupal handles the variable across page requests, especially if I have more than one web server serving up the data, or if I reboot the web server in between creating the form and submitting the form.
Where are these variables kept (presumably in memory)?
Comments
It's magic
When the page is loaded, the form build function is called, which defines the form values again.
The form build function is also called upon form submission, and then the validation and submit hooks are called after the form build.
This is why the form values do not need to be temporarily stored anywhere else.
--
Ixis (UK) providing Drupal consultancy and Drupal theme design.
--
Ixis (UK): Drupal support, Drupal hosting.
ah- so dynamically created
ah- so dynamically created values will be re-dynamically-recreated?
that's unfortunate, but makes sense. thanks!
It's nice in theory, but it
It's nice in theory, but it sucks if you have auto-generated or serialized form values, for example...
http://www.trailheadinteractive.com