You are here

function activity_create_form in Activity 7

Form builder to select what type of Activity to record.

1 string reference to 'activity_create_form'
activity_menu in ./activity.module
Implements hook_menu().

File

./activity.admin.inc, line 30
activity.admin.inc Contains administrative forms for activity.module

Code

function activity_create_form($form, &$form_state) {
  $hook_options = activity_form_options_hooks();
  $form['label'] = array(
    '#type' => 'textfield',
    '#default_value' => '',
    '#title' => t('Label'),
    '#weight' => -10,
    '#required' => TRUE,
  );
  $form['hook'] = array(
    '#title' => t('Choose your hook'),
    '#description' => t('The hook that this Activity will record messages.'),
    '#options' => $hook_options,
    '#type' => 'radios',
    '#required' => TRUE,
  );
  $form['next'] = array(
    '#type' => 'submit',
    '#value' => t('Create'),
  );
  return $form;
}