function theming_example_text_form

A simple form that displays a textfield and submit button.

This form will be rendered by theme('form') (theme_form() by default) because we do not provide a theme function for it here.

Related topics

1 string reference to 'theming_example_text_form'
theming_example_menu in theming_example/theming_example.module
Implements hook_menu().

File

theming_example/theming_example.module, line 250

Code

function theming_example_text_form($form, &$form_state) {
    $form['text'] = array(
        '#type' => 'textfield',
        '#title' => t('Please input something!'),
        '#required' => TRUE,
    );
    $form['submit'] = array(
        '#type' => 'submit',
        '#value' => t('Go'),
    );
    return $form;
}