Create jump menu with more options using programmatically I am using Drupal 7 and CTools. I want to create a jump menu using Ctools. I have checked the example code provided in the Ctools module. And it is working fine for one link only.

How do I add more links in Jump menu:

In the code shown below, look at here: $url = url('mypostings/groupsort'); I want to add more links in the jump menu,like url('mypostings/test1'), url('mypostings/test2') etc..

/**
 * Implementation of hook_menu();
 * @return 
 */
function post_display_menu() {
    $items['mypostings'] = array(
            'title' =&gt; 'My Posts in Group',
            'page callback' =&gt; 'get_my_postings',
            'access callback' =&gt; TRUE,
            'expanded' =&gt; TRUE,
    );
    $items['mypostings/groupsort'] = array(
            'title' =&gt; 'My Postings Filter',
            'page callback' =&gt; 'get_my_posting_filter',
            'access arguments' =&gt; array('access simple page'),
    );
    return $items;
}

function get_my_postings() {
    global $user;
    // Include the CTools tools that we need.
    ctools_include('ajax');
    ctools_include('modal');
    // Add CTools' javascript to the page.
    ctools_modal_add_js();
    $header = array(
            array('data' =&gt; t('Title'), 'field' =&gt; 'n.title'),
            array('data' =&gt; t('Created'), 'field' =&gt; 'n.created'),
            array('data' =&gt; t('Author'), 'field' =&gt; 'u.name'),
    );
    $query = db_select('node', 'n');
    $query-&gt;leftjoin('users', 'u', 'u.uid = n.uid');
    $query-&gt;fields('n',array('title', 'created'))
    -&gt;fields('u',array('name'))
    -&gt;groupBy('n.nid');
    $result = $query-&gt;execute();
    $rows = array();
    foreach ($result as $row) {
        $rows[] = array('data' =&gt; (array) $row);
    }
    $build['tablesort_table'] = array(
            '#theme' =&gt; 'table',
            '#header' =&gt; $header,
            '#rows' =&gt; $rows,
    );

    drupal_add_js($sample_style, 'setting');


    ctools_add_js('ctools-ajax-sample', 'ctools_ajax_sample');
    ctools_add_css('ctools-ajax-sample', 'ctools_ajax_sample');

    $output .= $build;

    // Create a jump menu
    ctools_include('jump-menu');
    $form = drupal_get_form('post_filter_jump_menu_form');
    $output .= '&lt;h3&gt;'. t('Jump Menu') .'&lt;/h3&gt;';
    $output .= drupal_render($form);

    return array('markup' =&gt; array('#markup' =&gt; $output));
    return $build;
}

/**
 * Helper function to provide a sample jump menu form
 */
function ctools_ajax_sample_jump_menu_form() {
    $url = url('mypostings/groupsort'); // I want to add 3 links in jump menu How can i add it
    $form_state = array();
    $form = ctools_jump_menu(array(), $form_state, array($url =&gt; t('Sort')), array());
    return $form;
}
See below code !

$form = ctools_jump_menu(array(), $form_state, array($url =&gt; t('Jump!') , 'http://www.google.com' =&gt; 'Go to google'), array());


OR

$options = array();
$options[$url1] = $label1;
$options[$url2] = $label2;
$form = ctools_jump_menu(array(), $form_state, $options, array());


Third argument of ctools_jump_menu is $select which is  


  An array suitable for use as the #options. The keys will be the direct
  URLs that will be jumped to, so you absolutely must encode these using
  url() in order for them to work reliably.