You are here

function itoggle_example_form in iToggle 7.3

Form callback.

Returns a form using the iToggle Form API element.

See also

itoggle_example_menu().

1 string reference to 'itoggle_example_form'
itoggle_example_menu in contrib/itoggle_example/itoggle_example.module
Implements hook_menu().

File

contrib/itoggle_example/itoggle_example.module, line 30
iToggle Example module.

Code

function itoggle_example_form($form, $form_state) {
  $form['checkbox'] = array(
    '#type' => 'checkbox',
    '#title' => t('Checkbox'),
  );
  $form['checkboxes'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Checkboxes'),
    '#options' => drupal_map_assoc(array(
      'foo',
      'bar',
      'baz',
    )),
  );
  $form['radios'] = array(
    '#type' => 'radios',
    '#title' => t('Radios'),
    '#options' => drupal_map_assoc(array(
      'foo',
      'bar',
      'baz',
    )),
  );
  $form['itoggle'] = array(
    '#title' => t('iToggle'),
    '#type' => 'itoggle',
    '#itoggle_type' => 'onoff',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}