Forum
NEW v3.1 Field Groups
I don't know if you want just one thread for all things "Field Groups" or separate threads. Either way, I've given it a quick go and have an observation/question:
Using a Field Group around 'standard' fieldtypes works exactly as you described. However, I also tried using a Group around some custom fieldtypes and the Group UI ignored the custom fieldtypes, instead wrapping itself around the first available standard fieldtype above the custom fieldtypes.
If for the moment it only works around standard fieldtypes, that's fine.
A very small thing with the UI - I can't click on the rotating arrow/circle image to collapse the Group. Clicking the title text bar (expanded) or the body (collapsed) works fine - my first instinct was to try clicking the (small) image! This was on Chrome version new-ish-something-or-other.
It should work for any field type, although you'll need to implement support for the content summary in collapsed mode.
Does your field appear in more than one place in the template?
Yes, it appears in more than one place.
Is the first instance in the group, or a secondary instance?
I originally tried around secondary instances, then tried a group around the first few instances, and I've just tried the group around the first instance only - same result; it shuffles up to the first available standard fieldtype.
As a visual aid, it looks like this currently: (this is used as a master template for collection items, so there is no html, just Perch fields)
The custom fields are all the same type.
I originally 'replaced' the dividers with groups - it always ends up wrapped around the Category field.
If you duplicate the template, swap the custom fieldtypes for basic
type="text"
and then use it on a new test region, does that change anything?I'm trying to understand if it's a quirk of the template or of the field type.
I think I've stumbled across the answer - doing as above (I created a new collection, just to be sure it was as near identical as possible), changing
type
to"text"
: same problem.My custom fieldtype has some attributes I use - one of which is
filterid="season"
(and of course, season is the name of the category field that the group ends up surrounding). When I started removing the attributes, as soon as I removedfilterid
, the group worked correctly. Have I stumbled across a variable/attribute name in your code that I'm inadvertently messing with? As soon as I rename my attribute to something else, the problem also goes away...Huh. That is interesting. There shouldn’t be any clashes in attribute naming, but it’s not outside the realm of possibility. I’ll give it a try and see if I can reproduce that.
No probs - just as a quick test, I added
filterid="someid"
to a standard text field (nothing to do with my custom fieldtype) and the same thing happens - so no need to test against anything custom.Really weird! I'll see if I can reproduce it.
An overly greedy regex capturing the
id="someid"
at the end offilterid="someid"
. Should be fixed in 3.1.1.