You are here

function asaf_example_api_simplest in Asaf (ajax submit for any form) 8

Same name and namespace in other branches
  1. 7 modules/asaf_example/asaf_example.api.simplest.inc \asaf_example_api_simplest()
1 string reference to 'asaf_example_api_simplest'
asaf_example_menu in modules/asaf_example/asaf_example.module
Implements hook_menu().

File

modules/asaf_example/asaf_example.api.simplest.inc, line 3

Code

function asaf_example_api_simplest($form, &$form_state) {
  $form['up'] = array(
    '#markup' => l('← Go to the examples list', 'examples/asaf_example'),
  );
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  asaf_prepare_form($form, $form_state);
  return $form;
}