trigger_example_form

Versions
7
trigger_example_form(&$form_state)

A form to help fire our triggers.

Code

developer/examples/trigger_example.module, line 128

<?php
function trigger_example_form(&$form_state) {
  $form['help'] = array(
    '#type' => 'item',
    '#value' => format_plural(variable_get('trigger_example_pings', 0), 'There is only @count ping out there.', 'There are @count pings out there. Come on pong them back.'),
  );
  $form['ping'] = array(
    '#type' => 'submit',
    '#value' => t('Ping'),
  );
  if (variable_get('trigger_example_pings', 0)) {
    $form['pong'] = array(
      '#type' => 'submit',
      '#value' => t('Pong'),
    );
  }
  return $form;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.