Display tabs on a custom content type's form without using extra modules?

stodge - June 5, 2009 - 16:28

One of my custom content types has lots of fields that the user can enter data into. Some are needed when the node is created and some are filled in later. I want to change my hook_form so that groups of fields are displayed on different tabs. The user can click a tab and view other group fields without re-loading the page. Is there any way to do this in Drupal, without resorting to extra modules?

Thanks

_

WorldFallz - June 5, 2009 - 16:32

I don't believe there's a way through the core ui and if you're going to custom code it (which requires you create a module anyway) why not just use the existing module?

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Thanks - this is a custom

stodge - June 5, 2009 - 16:41

Thanks - this is a custom content type in a module, not the CCK. Maybe this'll do: http://drupal.org/project/tabs. I was hoping to limit the number of additional modules but oh well.

Thanks

I installed and enabled the

stodge - June 8, 2009 - 16:28

I installed and enabled the tabs module and added this code (http://www.thewhyandthehow.com/jquery-tabs/) to my module's template file but I don't see any tabs. I realise the tabs module is purely API only but is there something else I need to do?

Thanks

Viewing the page source shows

stodge - June 10, 2009 - 13:33

Viewing the page source shows the script tags for JQuery and its tab plugin, so I presume they're being loaded ok. But I can't see why the tabs aren't being rendered as tabs.

See the tabsexample.module

nedjo - August 25, 2009 - 23:48

You can download the tabsexample module with the development version of tabs module. It contains examples of how to construct tabs. For your custom content type, you would need to alter the form to change it to have tabs.

 
 

Drupal is a registered trademark of Dries Buytaert.