Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
539994e2
Commit
539994e2
authored
Feb 27, 2006
by
Gerhard Killesreiter
Browse files
#43826
, no way to suppress form_id, patch by wtanaka
parent
9bb285aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
539994e2
...
...
@@ -49,7 +49,9 @@ function element_children($element) {
* and then submit the form using drupal_submit_form().
*
* @param $form_id
* A unique string identifying the form. Allows each form to be themed.
* A unique string identifying the form. Allows each form to be
* themed. Pass NULL to suppress the form_id parameter (produces
* a shorter URL with method=get)
* @param $form
* An associative array containing the structure of the form.
* @param $callback
...
...
@@ -70,7 +72,9 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
$form
[
'form_token'
]
=
array
(
'#type'
=>
'hidden'
,
'#default_value'
=>
md5
(
session_id
()
.
$form
[
'#token'
]
.
variable_get
(
'drupal_private_key'
,
''
)));
}
$form
[
'form_id'
]
=
array
(
'#type'
=>
'hidden'
,
'#value'
=>
$form_id
);
if
(
isset
(
$form_id
))
{
$form
[
'form_id'
]
=
array
(
'#type'
=>
'hidden'
,
'#value'
=>
$form_id
);
}
if
(
!
isset
(
$form
[
'#id'
]))
{
$form
[
'#id'
]
=
$form_id
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment