Creating a Tabbed Form

First, I’m new to Yii and MVC in general. After using Gii to generate my Views I find that I need to make a modification.

One of my forms has 40+ fields on it and I would like to break it up into sections and use a tabbed interface. I can’t quite figure out how to do this.

Can anyone point my in the right direction other than simply suggesting I use cjuiTabs? I guess I’m looking for example code.



If you want to stay really simple, use unordered lists and some jQuery, like this:

Then wrap your form in the tabs.

It should work. :)

What you suggest is actually what I’m used to. I was wanting to use cjuiTabs, but I don’t quite understand how to assign content to each tab. I tried breaking the fields out into subforms, but I couldn’t get that to work (because I don’t yet know what I am doing) and I also don’t know if that is necessary.

I put in a better link.

Look at my post again! ;D

I used that example myself - mainly because I don’t like the jQuery UI myself - and because it makes it easier to understand what’s going on. ;)