Jump to content

FieldsetOpen & FieldsetTabOpen – what is it?


Adam Kiss
 Share

Recommended Posts

That is the intended use. Fieldset will group multiple fields together for editing ease. If you use the FieldsetTab it will place them in a separate tab in the editor (like children and settings). Both can be nested as much as needed. I work on a couple sites that have 50+ fields in a template. So grouping of this sort becomes important. For sites that don't deal with a lot of fields, these fieldtypes will likely not get much use. These fields don't have much use outside of the admin, unless you needed to perform some kind of grouping on the front end.

Link to comment
Share on other sites

  • 8 months later...

Got a little question here: I’ve been trying the Fieldset field types in a current template I’m working on. Now when opening the page edit interface, three info messages pop up at the top telling me the first part of the fieldsets name an the encapsuled fields. They all are named like »tab-xy« and »meta-xy«. See attached screenshot. Any idea, what causes these messages?

post-310-132614281938_thumb.png

Link to comment
Share on other sites

  • 1 year later...

Going to dig this thread up again with another question:

Would it be possible to reference fields via Fieldsets? (or something similar since I know right now they don't have much to do with the API)

For example, in a template you could set up something like
 

  • title
  • about_fieldset_start
  •       title
  •       description
  • about_fieldset_end
  • contact_fieldset_start
  •       title
  •       description
  • contact_fieldset_end

Then reference the "title" for "about" by: $page->about_fieldset->title?

I know that currently you can only place one "title" field per template, but it would be helpful if you could place multiple if there were different groups. Because if on a page there were many different disjointed sections (where you can't use repeaters) like "about", "contact", "feedback", etc... right now wouldn't you have to make title field for all of them? e.g. "about_title", "contact_title", "feedback_title"? Or is there a different method I'm missing?  

Link to comment
Share on other sites

There is no different method. The same field can't be repeated on the same page because of how the database is built. The fieldset doesn't take any part on structuring the fields on the database, so you should consider it merely like a cosmetic thing for the admin. Right now, the only way to group fields as you want is the repeater, but I think that in your case the best would be to have independent fields like "group1_title", "group2_title" and edit their labels to read only "title". On the admin side it will be no different from your first idea.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

... These fields don't have much use outside of the admin, unless you needed to perform some kind of grouping on the front end.

Ryan says you can use fieldset for grouping on the frontend, diogo says you can't. Could you please clear things out: сan I get all fields within a fieldset via API from the frontend? If so, how?

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...