I'm using a base install of Drupal 5.7 under the Aurora theme with Image Gallery and Flash Gallery modules installed and a handful of the Core - Optional modules that come with it. Just installed the Javascript Tools module, but for the life of me I can't get Tabs working properly.

Fairly certain I've done something entirely wrong in trying to figure out how to get Tabs working. Read the readmes and so forth, but using the example code:

<?php
    $form = array();

  $form['example1'] = array(
    '#type' => 'tabset',
  );
  $form['example1']['tab1'] = array(
    '#type' => 'tabpage',
    '#title' => t('One'),
    '#content' => t('First tab content.'),
  );
  $form['example1']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Two'),
    '#content' => t('Second tab content.'),
  );
  $form['example1']['tab3'] = array(
    '#type' => 'tabpage',
    '#title' => t('Three'),
    '#content' => t('Third tab content.'),
  );

  return tabs_render($form);
?>

Returns this error.
Fatal error: Call to undefined function tabs_render() in /home/rin/public_html/includes/common.inc(1352) : eval()'d code on line
23

Even using other example code from other users that I've found digging around while looking for more info about it initially does not yield any results. This, for instance, will result in just a empty preview and not actually showing any tabs at all.

<?php
  $tabs .= theme('tabs_tab_page', t('First tab'), t('This is the first tabbed page'));
  $tabs .= theme('tabs_tab_page', t('Second tab'), t('This is the second tabbed page'));

  $output = theme('tabs_tabset', 'example', $tabs);

  print $output;
?>

Not entirely sure how to go about figuring out how to get this up and running.

Comments

cirno’s picture

Status: Active » Closed (fixed)

And nevermind, now it works.

igor.stamatovski’s picture

I am having the same problem on a drupal 5.7 setup with jstools.

It would have been nice to share,
what exactly did you fix in order for the before mentioned code started working?

Or what am I doing wrong to get the same result of not being able to get the tabs to appear

nilo’s picture

Could you please share how you got it working?
Thanks