Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have fieldgroups on and do not see any settings to make groups conditional based on fields.
Nice work!
Comments
Comment #1
peterpoe CreditAttribution: peterpoe commentedMake sure that:
- The user you are currently logged in has the 'administer conditional fields' access
- The fields that you want to set as controlling fields have allowed values
If the above are OK and the field settings are still not appearing, could you please export the field settings using the content_export.module and attach them?
Thanks
Comment #2
nathanraft CreditAttribution: nathanraft commentedOk, I was trying to control a group with a field from within another group. As this is a limitation for fields I now see why it didn't work with groups. So I have to have a field not in a group to control the visibility of a group. The problem is when I make forms with groups, all my fields are within groups. My bet is that this is how most people build forms too.
Impressive work... btw.. I am the one who sponsored explainfield...
Comment #3
peterpoe CreditAttribution: peterpoe commentedThere are many limitations to the conditional fields one can assign, but I though it was better to release a limited initial version and maybe add flexibility later.
Limitations:
While these could all be considered bugs (especially the latter), I had to enforce these because they would add great complexity both to the form validation code and to the javascript.
E.g.:
In the case you are asking:
what happens when:
'a' (not in a group) controls the group 'b'
'c' (not in a group) controls the field 'd' (in group 'b')
If 'c' is triggered, but 'a' is not triggered, 'd' would be invisible, but still be considered triggered (and as such, require validation)
Almost all the problems arise from the fact that basic form validation (which is done by _form_validate) is not overridable. If we could find a way to skip _form_validation for fields that weren't activated, all would be simpler.
ps: explainfield is great, but I resolved to code this because I needed more flexibility, and when I had more flexibility, I found that I needed even more, and more...
Comment #4
peterpoe CreditAttribution: peterpoe commentedChanging the category, as this should be considered a feature request.
Comment #5
nathanraft CreditAttribution: nathanraft commentedThanks for the detailed response. Please let me know if I can help with specific testing.
Comment #6
peterpoe CreditAttribution: peterpoe commentedComment #7
peterpoe CreditAttribution: peterpoe commentedThere are now open issues on more specific features, like this: #344689: Nested conditional fields.