multipage_form_set_attribute

Versions
4.7 – 6
multipage_form_set_attribute(&$element, $key, $new_value)

Set an attribute on an element array with storing the previous value which may be reverted to using multipage_form_restore_attributes().

Parameters

$element The form element array to modify.

$key A key of the form element array.

$new_value The new value for the attribute.

▾ 1 function calls multipage_form_set_attribute()

multipage_form_set_element_visibility in developer/examples/multipage_form_example.module
Set an element's visibility. Elements are gnerally changed to hidden elements. Visibility may be set and reset any number of times.

Code

developer/examples/multipage_form_example.module, line 433

<?php
function multipage_form_set_attribute(&$element, $key, $new_value) {
  $element['#multipage_form_original_'. $key] = $element[$key];
  $element[$key] = $new_value;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.