Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

It's that time again! Now that awesome CB Template Changer 4.0.0 and its awesome Template Builder functionality has been released it's time to start on the next thing. This time we're diving into a NEW project entirely. We're calling it CB Field Groups. Check out the details below.

The idea behind CB Field Groups is exactly as the name implies. It's to group fields together. You maybe wondering why you'd need this since you can just move fields to be next to each other, but that's just a minor part of it. CB Field Groups brings our CB Repeat jQuery usage as seen in backend (all those + and - minus with Add Row/Add Rows buttons are CB Repeat) to the frontend. Instead of just jabbering about it lets take a look at it below.

This is on frontend in a users profile edit. What it does is offer a new Field Group fieldtype. You'll be able to select from your existing fields to be included in the field group. You can then configure how many times you want to allow this field group to repeat. This is extremely handy for things like providing multiple phone numbers or multiple addresses without having to have multiple sets of fields. Once saved they'll display on your profile like they would any field one after another. All of this is using the fields normal configured behavior since it's just taking your existing fields, grouping them, and allowing for unlimited reuse of them. Check out the display below.

This is a very early implementation. Due to the way some integration plugins behave and how some fields storage behavior behaves the field grouping usage may not be available to all field types and grouped fields will have their conditions, privacy controls, and ajax usages disabled (you can still apply all 3 to the actual field group field; just not the fields the field group field is outputting).

There's still a lot of work ahead, but I hope this will be able to bring some new usability to your site in the future.


krileon replied the topic:
6 years 5 months ago
Ok, with some improvements to CB it self the following fields now work in repeat usages.

Image
File
Video
Audio

There will likely still be issues with image approval however as it may not be possible to extend the approval page with repeat field usages. This is still being reviewed. However upload/gallery/link behaviors of the above respective fields works fine. Yes, in theory this means you could have a image gallery from image fields but I highly highly suggest you do not and instead just use CB Gallery.
krileon replied the topic:
6 years 5 months ago
Ok, it's looking like the following fields will not be allowed in Field Groups.

Editor Text Area
Image
File
Video
Audio
Rating
Points

The reason the above won't be allowed, initially, is due to their jQuery bindings not supporting being rebound when CB Repeat clones them. The plan is to fix that behavior in CB it self when possible and then enable those fieldtypes in CB Field Groups. Additionally the following fieldtypes will never be permitted for grouping due to their intended function and behavior.

Gallery
Activity
Comments
Notifications
Follow
Like
Privacy
Progress
Forum Status

All other field types will function fine and as intended. For example Text, Text Area, Integer, Email Address, etc..
krileon replied the topic:
6 years 5 months ago
It's likely you'll be able to ajax edit a field group (the entire field group, not the individual fields in the field group), yes. As for conditioning the fields in a field group, no not initially as that requires some fixes and improvements in CB Conditional it self to handle and it's not a guarantee it'll ever be possible.
timstohr replied the topic:
6 years 5 months ago
Hi Kyle,
I am currently using cb fields to set new functionalities (eg subscribe to push notifications). Lets say I have thirty of them. Our user currently has to use AJAX for all of them which is really annoying as he has to do a LOT of clicks and waits. It would be much easier if we could put these all in a "group" then you can edit the group and change all of them instead of changing each one by one. Furthermore you can then make the fields dependent on each other which is not possible in AJAX (ie IF field XYZ has value ABC, then open field with "Why customer chose ABC") Will that be possible?