Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I can't get the accordion to work on the form display.
I added a group set to accordion and two other nested ones set to accordion item. Nested inside the accordion items I placed an image field in each one. It gets rendered correctly but both fields are opened. I looked at the rendered code and the h3
tag for each field has the field-group-accordion-active
class. Is there a something else I need to download to make the javascript work??
I'm using Drupal 8.1, with PHP 5.6 on Ubuntu 14.04
Any help would be appreciated.
Thanx
Comment | File | Size | Author |
---|---|---|---|
#7 | field_group-accordion-not-working-2729569-2.patch | 1.85 KB | ozin |
Comments
Comment #2
ozinThe problem was in accordion.js file. Patch attached, please check.
Comment #3
chavab_1 CreditAttribution: chavab_1 commentedI applied the patch but it's still not working. I get the same rendered results. The wrapping div and the H3 are added but all items are displayed open.
Comment #4
ozinHi @chavab_1 . You need to use 8.x-1.x-dev version of the module or add changes from this commit before applying this patch.
Comment #5
chavab_1 CreditAttribution: chavab_1 commentedHey @ozin. Thank you very much!! This works exactly as expected. Great work!!
Comment #6
chavab_1 CreditAttribution: chavab_1 commentedOne minor thing. Even if I select the "Closed" by default, the items still appear open by default. Is there a setting that I'm missing or is it something else??
Thanx
Comment #7
ozinHi @chavab_1
Good catch! It was the bug with the formatter settings. Please check my new patch.
Comment #8
chavab_1 CreditAttribution: chavab_1 commentedPerfect!! That did the job.
Thanx a lot man!!
Comment #9
gtsopour CreditAttribution: gtsopour commentedThis patch field_group-accordion-not-working-2729569-2.patch worked for me too.
Thanks
Comment #10
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI work on a test.
Comment #11
gngn CreditAttribution: gngn at Computer Manufaktur GmbH commentedpatch at #7 worked for me too, applied to current dev 8.x-1.0-rc4+24-dev (2016-06-25).
Thank you.
Comment #12
chavab_1 CreditAttribution: chavab_1 commentedThanx gngn!! Was waiting for this patch to be applied so I can update my version.
Comment #13
leraa CreditAttribution: leraa commented#7 patch worked for me as well, using 8.1.5 core. Thank you!
Comment #14
acrollet CreditAttribution: acrollet commentedcode looks good, patch fixes the problem - marking RTBC
Comment #15
Tom Nelson CreditAttribution: Tom Nelson commentedSorry, posted here in error.
Comment #17
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedThx for the patch. I can confirm that it's working, and committed it to dev
Comment #18
ozin