You are here

function __gotwo_manual_add in Go - url redirects 5

Manually add a go entry

1 string reference to '__gotwo_manual_add'
gotwo_menu in ./gotwo.module
Implementation of hook_menu

File

./gotwo.module, line 491
Module that provides easy to use redirection links. A redirection link would be like: http://examples.org/go/a_label http://examples.org/go/123546 http://examples.org/go/or/like/this

Code

function __gotwo_manual_add() {
  drupal_set_title('Add go entry');
  $form['src'] = array(
    '#type' => 'textfield',
    '#title' => t('Label'),
    '#description' => t('The label used in the go url, this will automatically be made suitable'),
    '#required' => true,
  );
  $form['dst'] = array(
    '#type' => 'textfield',
    '#title' => t('Destination'),
    '#description' => t('The target url. Can be a relative drupal url or an absolute url.'),
    '#required' => true,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add'),
  );
  return $form;
}