Reputation: 2673
I was looking at some module code:
$element['location_settings'] = array( '#type' => 'value', '#value' => $element['#location_settings'], );
What is the meaning of # in #location_settings And i'm unsure whether $element['#location_settings'] is a form element or just a regular variable in this case.
Upvotes: 0
Views: 47
Reputation: 7661
'#' is for Drupal theming, Drupal will read those variables for theming hook. These variable are not general, it means nothing if not passed into form function or theming function.
Upvotes: 0
Reputation: 180
In the Drupal FAPI all variables (keys), that starts with '#' treated as properties/data of the current node, all other variables treated as children nodes. This is just a FAPI convention.
So, $element['#location_settings'] can't be children form element, only regular variable.
Upvotes: 1