| Versionen | |
|---|---|
| drupal6 | drupal_render_form($form_id, &$form) |
Renders a structured form array into themed HTML.
$form_id A unique string identifying the form for validation, submission, theming, and hook_form_alter functions.
$form An associative array containing the structure of the form.
A string containing the themed HTML.
includes/
<?php
function drupal_render_form($form_id, &$form) {
// Don't override #theme if someone already set it.
if (!isset($form['#theme'])) {
init_theme();
$registry = theme_get_registry();
if (isset($registry[$form_id])) {
$form['#theme'] = $form_id;
}
}
$output = drupal_render($form);
return $output;
}
?>
Kommentare
Kommentar hinzufügen