function _spaces_og_make_hidden in Spaces 6.2
Same name and namespace in other branches
- 5.2 spaces_og.module \_spaces_og_make_hidden()
- 6.3 spaces_og/spaces_og.pages.inc \_spaces_og_make_hidden()
- 6 spaces_og/spaces_og.module \_spaces_og_make_hidden()
- 7.3 spaces_og/spaces_og.pages.inc \_spaces_og_make_hidden()
- 7 spaces_og/spaces_og.pages.inc \_spaces_og_make_hidden()
Set all elements in a given form to 'value'. Using value preserves the tree and prevents The element from being rendered.
2 calls to _spaces_og_make_hidden()
- _spaces_og_form_alter_group in spaces_og/
spaces_og.module - Group node form_alter(). @TODO: repair default values on node previews.
- _spaces_og_form_alter_node in spaces_og/
spaces_og.module - Group-enabled node form_alter()
File
- spaces_og/
spaces_og.module, line 976
Code
function _spaces_og_make_hidden(&$form) {
if (isset($form['#type'])) {
$form['#type'] = 'value';
$form['#required'] = false;
}
if (is_array($form)) {
foreach ($form as $key => $value) {
if (is_array($value) && strpos($key, '#') !== 0) {
_spaces_og_make_hidden($form[$key]);
}
}
}
}