Commit a3619c58 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Added a function to get the value of the password field. This only listens

to 'value' and the request, as there's not much point in having default
values.
parent b86bd2c3
......@@ -39,4 +39,15 @@ function form_render_password($element, $form) {
. ' value="' . hsc($form->get_value($element)) . '">';
}
function form_get_value_password($element, Form $form) {
$global = ($form->get_method() == 'get') ? $_GET : $_POST;
if (isset($global[$element['name']])) {
return $global[$element['name']];
}
if (isset($element['value'])) {
return $element['value'];
}
return null;
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment