diff options
Diffstat (limited to 'views/default/input/form.php')
-rw-r--r-- | views/default/input/form.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/views/default/input/form.php b/views/default/input/form.php index c30dd5c9a..565db3afe 100644 --- a/views/default/input/form.php +++ b/views/default/input/form.php @@ -10,17 +10,24 @@ * @link http://elgg.org/ * * @uses $vars['body'] The body of the form (made up of other input/xxx views and html - * @uses $vars['method'] Method (default POST) - * @uses $vars['enctype'] How the form is encoded, default blank - * @uses $vars['action'] URL of the action being called * @uses $vars['disable_security'] Force the securitytokens not to be added to this form (@todo what's the point??) * */ +$defaults = array( + 'body' => '', + 'method' => 'POST', +); + +$vars = array_merge($defaults, $vars); if ($vars['disable_security'] != TRUE) { - $vars['body'] .= elgg_view('input/securitytoken'); + $body .= elgg_view('input/securitytoken'); } - unset($vars['disable_security']); -echo elgg_view('html/form', $vars); +$body = $vars['body']; +unset($vars['body']); + +$attributes = html5_get_html_attributes($vars); + +echo "<form $attributes>$body</form>"; |