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.
Hi,
I have webform installed with no only a few extra modules ("webform_term_options").
I use simple conditional logic with nested fieldsets.
No conditional logic is working, even the simplest one :(
How can I solve this ?
I always get so frustrated in Drupal for such things ...
Comments
Comment #2
Liam MorlandTry disabling webform_term_options to see if that is the problem. Showing and hiding fieldsets with conditionals should work.
Comment #3
Ananda CreditAttribution: Ananda commentedI can't disable webform_term_options-module, as there are lots of reusable radio-options fields I need...
Comment #4
Liam MorlandI mean as a test to see if that is the problem.
Comment #5
Ananda CreditAttribution: Ananda commentedHi,
Sorry, you're right.
I added a manual radio box element on that form, but still no conditionals work.
On another new form, the conditionals do work (there are no webform_term_options there)
Comment #6
Liam MorlandTry adding a webform_term_options to the form that is working. If it breaks, that strongly suggests that the problem is with webform_term_options.
Comment #7
Ananda CreditAttribution: Ananda commentedI added a "webform_term_options" and the other form stil had working conditionals.
But on my other form, all elements which need conditional logic are embedded in 3 layers of fieldsets. Maybe that could cause the issue ?
Comment #8
Liam MorlandYes, it could be. It will take some experimentation to find the minimal case which reproduces the problem.
Comment #9
Ananda CreditAttribution: Ananda commentedYou were right.
I looked for the "minimal situation" where the standard webform conditionals still work. And I tested that this is when the fields are embedded in maximum two "fieldset wrappers".
My fields with conditional logic where wrapped in three "fieldset wrappers", and this made the "webform conditionals" stop working
I don't know why ? ....
So I made another form, without three level wrapped fieldsets, and maximum two wrappers around the webform fields, and this works :)
So thanks for the help, this is solved !
Comment #10
Ananda CreditAttribution: Ananda commentedComment #11
Liam MorlandFieldsets should be able to nest arbitrarily deep. If it is not working for three or more, that is a bug. If so, please steps to reproduce the problem.
Comment #12
Ananda CreditAttribution: Ananda commentedHi Liam,
Thank you for your concern.
Three or more leveled fieldsets do not work on my webform.
Could you elaborate on how I could provide you with steps to reproduce this "issue" ? It could be that this is only on my own configuration, with my own set of modules and techniques used.
Comment #13
Liam MorlandIf there is a bug in Webform, I would like steps to reproduce so that it can be fixed. If it is something special about your configuration, it is up to you to fix.