You do not need to use a form to save these values.
variable_set() functions will make it much easier to set the value and retrieve it.
However, if you still want to pass the information via the theme's .info file, you can do as follows:
Add your custom variables to the .info file
name = my_awesome_theme
core = 7.x
dragons_exists = 1
how_to_catch_a_dragon = "Be a dragonlord"
how_to_catch_a_dragon = "Tell him to surrender"
Drupal will ignore these extra stuff during normal module/theme scanning.
To get the value, you can it like this:
$data = drupal_parse_info_file('sites/all/themes/my_awesome_theme.info');
You can use functions like
drupal_get_path() to get the correct path.
$data will contain the values from the .info file.
For example, the above .info file will yield
drupal_parse_info_file() doc mentions that you should NOT use this method to store arbitrary data.
Parses Drupal module and theme .info files.
Info files are NOT for placing arbitrary theme and module-specific
settings. Use variable_get() and variable_set() for that.
If you only need to pass some variable from the form, and not necessarily from the .info file, just store the value in
As long as you don't overwrite some existing values,
$form_state['values'] for example, it will work just fine.
Also, consider using a form element of
#type => value. User will not see anything at all, not even a hidden form element. You can access this value from