Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
input
form.php
Go to the documentation of this file.
1
<?php
18
$defaults
= array(
19
'method'
=>
"post"
,
20
'disable_security'
=> FALSE,
21
);
22
23
$vars
= array_merge(
$defaults
,
$vars
);
24
25
if
(isset(
$vars
[
'class'
])) {
26
$vars
[
'class'
] =
"elgg-form {$vars['class']}"
;
27
}
else
{
28
$vars
[
'class'
] =
'elgg-form'
;
29
}
30
31
$vars
[
'action'
] =
elgg_normalize_url
(
$vars
[
'action'
]);
32
$vars
[
'method'
] = strtolower(
$vars
[
'method'
]);
33
34
$body
=
$vars
[
'body'
];
35
unset(
$vars
[
'body'
]);
36
37
// Generate a security header
38
if
(!
$vars
[
'disable_security'
]) {
39
$body
=
elgg_view
(
'input/securitytoken'
) .
$body
;
40
}
41
unset(
$vars
[
'disable_security'
]);
42
unset(
$vars
[
'action_name'
]);
43
44
$attributes
=
elgg_format_attributes
(
$vars
);
45
46
echo
"<form $attributes><fieldset>$body</fieldset></form>"
;
elgg_normalize_url
elgg_normalize_url($url)
Definition:
output.php:290
$defaults
$defaults
Definition:
form.php:18
$body
$body
Definition:
form.php:34
$attributes
$attributes
Definition:
form.php:44
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_format_attributes
elgg_format_attributes(array $attrs=array())
Converts an associative array into a string of well-formed attributes.
Definition:
output.php:118
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$vars
$vars
Definition:
form.php:23
Generated on Fri Oct 11 2024 00:00:39 for Elgg by
1.8.11