Jump to content

Fieldset (Page) as fieldset type "Tab"


Alpine418
 Share

Recommended Posts

Hi,

I'm using Fieldset (Page) a lot for my sites. But unlikey the field only support fieldset as fieldset type.

Is there any support to choose the fieldset type for Fieldset (Page), like it is supported for Fieldset (Group)?

Example of the fieldset type selection for Fieldset (Group):

image.thumb.png.427f5a1adf01cbe0190e6f66d5db1fb5.png

 

Thanks.

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 5 months later...

I was a pretty confused here, but I see now that FieldsetGroup is a Pro Module and FieldsetPage isn’t. Maybe ask in the ProFields-Support board? Otherwise you’ll have to compare the two modules’ code.

I assume you’ve already ruled out creating a standard FieldsetTab and putting it around your FieldsetPage? I just tried that and it looks fine to me. @rjgamer @Neue Rituale

grafik.png.58e44f3a8bf7cf0367dfe3ab9d37f88f.png

Link to comment
Share on other sites

You mean like this?

grafik.thumb.png.59992583087010da2fd19c4b24606236.png

 

Use this very hackish hook and replace the word “tabcontents” with the name of your FieldsetPage field:

$this->addHookAfter('ProcessPageEdit::execute', function(HookEvent $event) {
    $event->return = $event->return . '<script>document.querySelector("#wrap_Inputfield_tabcontents > label.InputfieldHeader").remove();</script>';
});

Might want to only apply it to certain templates, too, but whatever. Sorry, I couldn’t find an easy way to remove the element from the output directly, but this should be fine.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Just bumping this thread from a couple of years ago because it's the top result for "fieldset page as a tab" ? 

I wanted to say that I think it would be a really good idea if this was baked into the Fieldset Page by default. 

In fact, I think a tick box to make basically any field live in a tab of its own could be a pretty good idea.

At this point a single field can contain so many subfields. There's Repeater Matrix, FieldsetPage, Profields: Combo, tables, textareas, and more. Many of these field types do a great job of reducing the amount of fields you need overall, but also lead to a very cluttered page edit screen. Fieldset Tabs were excellent in the past when we didn't have so many clever fields-within-fields, but now it feels like there could be a better way?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...