[Resolved] Data-dependent field group not showing up
This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Context: I have a CPT record that contains a number of different fields in the backend.
Video: hidden link
But, on the Frontend, for the _same CPT_, there are _2 different Layout templates_ - which are dependent either the CPT by itself, or CPT+custom taxonomy values.
Because of this, there are a lot of fields.
So we created a metabox with a select dropdown, and a few unique values.
We then used the data-dependent feature on Field Groups to display specific ones in a given CPT when that metabox value was selected.
Issue: There are certain fields from Field Groups that are _not_ showing up in the CPT, even though the Field Group is _not_ data-dependent, and is directly assigned to the CPT.
It seems I can only access these fields is if I select a layout option of _another CPT_ which contains the Field Group with the field in it.
Could you help provide some visibility into how to properly use data-dependent Field Groups in this manner?
Thank you for your reply. I've gone ahead and set everything to "when ALL conditions are met", and for the most part, it's fixed the issues.
One thing that I've noticed - hidden link.
1.) The field I want to show up is captured in the selector option value above, and I no longer see the field I want in the option below. Is there any type of sequencing that happens where if it's already been data-dependent earlier in the selector values, that it won't show up after it?
2.) Curious, if there are multiple Field Groups that are data-dependent on values in a selector field... does that mean that ALL of the Field Groups are loaded, but hidden?
a.) If so, would that dramatically increase the # of fields that are loaded on each CPT backend page load?
b.) Would that be an issue on the frontend page load as well?
Glad to know that your original issue is resolved.
1.) The field I want to show up is captured in the selector option value above, and I no longer see the field I want in the option below. Is there any type of sequencing that happens where if it's already been data-dependent earlier in the selector values, that it won't show up after it?
==> I've day off tomorrow. You can mark this ticket resolved as your original issue is resolved. Please feel free to open a new ticket for this issue so that other supporters help you with your question or you should wait until this Friday.
2.) Curious, if there are multiple Field Groups that are data-dependent on values in a selector field... does that mean that ALL of the Field Groups are loaded, but hidden?
==> Yes - thats correct.
a.) If so, would that dramatically increase the # of fields that are loaded on each CPT backend page load?
==> We are using the JS to hide the field groups so it should be loaded yes.
b.) Would that be an issue on the frontend page load as well?
=> That is obvious I think that if you have 5 fields you have improved performance and if you have 50 fields its different. But I dont think it will break your site.
Hope your week has been going great. In that case, would it make sense for me to create a separate metabox and have it contain only values that are relevant to the CPT itself, and not just ALL of the CPTs?
It's a bit hard to explain, so I'll just show you: hidden link
Please let me know if you have any questions. Thank you!
Got it, that sounds good. Curious - similar to how Toolset has the "Scan" function for Views, is there a way to "scan" which fields/field groups are data-dependent on other fields/field groups?
I've found that it's hard to pinpoint all of the fields that have dependencies and is more of a "hit-or-miss." Anything that can quickly figure out what are all of the fields that are dependent on that particular field or value would be wonderful.
Okay, thanks for clarifying. Would we be able to file this as a feature request? It seems like it'd be quite helpful when you have a lot of data-dependent fields/field groups/values going on.