Frage zum Forms API Quickstart Guide

am 19.02.2010 - 12:35 Uhr in
Hi,
hab mir grade die Seite angesehen: Forms Quickstart
Leider wird bei mir die Funktion theme... nicht beachtet..es müsste ja der String "Form themen" ausgegeben werden. Was mache ich falsch?
<?php
function tester_menu(){
$items = array();
$items['tester'] = array(
'page callback' => 'tester_page',
'access arguments' => array('access content'),
);
return $items;
}
function tester_page(){
return drupal_get_form('tester_form');
}
function tester_form(){
$form['firstname'] = array(
'#type' => 'textfield',
'#title' => 'Vorname'
);
return $form;
}
function theme_tester_form($form){
$output = 'Form themen';
$output .= drupal_render($form);
return $output;
}
?>
- Anmelden oder Registrieren um Kommentare zu schreiben
Probiers mal
am 26.02.2010 - 14:49 Uhr
Probiers mal mit:
<?php
function tester_tester_form($form){
$output = 'Form themen';
$output .= drupal_render($form);
return $output;
}
?>
Also das Themen ist manchmal
am 19.02.2010 - 14:50 Uhr
Also das Themen ist manchmal noch etwas undurchsichtig für mich.
so funktioniert es aber zumindest:
<?php
function tester_theme(){
return array(
'tester_form' => array(
'arguments' => array('form' => NULL),
),
);
}
function theme_tester_form($form){
$output = 'THEME!!!';
$output .= drupal_render($form);
return $output;
}
function display_tester_form(){
$formular = drupal_get_form('tester_form');
return $formular;
}
?>