multipage_form_set_attribute
developer/examples/multipage_form_example.module, строка 433
- Версии
- 5 – 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()
.
Параметры
$element
The form element array to modify.
$key
A key of the form element array.
$new_value
The new value for the attribute.
Код
<?php
function multipage_form_set_attribute(&$element, $key, $new_value) {
$element['#multipage_form_original_'. $key] = $element[$key];
$element[$key] = $new_value;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии