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 configured a webform to show a Name field only when a certain checkbox is empty (if [checkbox field] is empty then [name field] is shown).
I hide other fields in the same manner, dependent on the same checkbox, and they all toggle correctly, but the Name field remains visible no matter what.
I'm using the 7.x-1.x-dev from 2015-May-07.
Comment | File | Size | Author |
---|---|---|---|
#4 | name-2496775-3-no-theme-wrapper-on-render-breaks-conditional.patch | 543 bytes | Alan D. |
Comments
Comment #1
WebbehAble to reproduce this issue as well. Conditionals just don't seem to be sticking to the Name field.
Comment #2
nathan573 CreditAttribution: nathan573 commentedEncountered an issue I think is related to this. I'm using conditional fields in a webform, but not on the actual Name Field. Whenever the field produced by the the Name Field module is updated it throws an error, though:
I tracked it down to this function:
So, I think our issues are caused by the Name Field module not rendering divs with the structure and classes that the Webform module is looking for. The above JS seems to break because the top level "form-item" div that contains the Name fields does not have a "webform-component" class. I looked at the Name Field module code but could not immediately identify a place that I might be able to add that class. Hopes this helps someone.
Comment #4
Alan D. CreditAttribution: Alan D. commentedSuper easy fix pushed (missing element theme wrapper).
Need to assess D8 if relevant still.
Comment #5
Alan D. CreditAttribution: Alan D. commentedClosing, need to fully port everything related to webform integration