Multiple expander fields

Created on 23 January 2013, almost 12 years ago
Updated 19 August 2024, 5 months ago

Great module, but I am having a bit of a problem with using more than 1 field with the expander in my View. Here is the scenario:

- Content view
- 4 fields - title, body, standards, assessment
- Standards & Assessment I need to use the expander field for. Both are long text fields in a content type, similar to how the body field would be setup

When I make one of the fields (Standards) into an Expander, the first one shows the text ("Standards Overview") to expand down fine, and the functionality is there, meaning that the text expands. However if I try to make the 2nd field (Assessment) into an expander as well, it's Expand Text shows "Standards Overview" as well BUT it does show the text for assessment.

So essentially it looks like this

Unexpanded:
Standards Overview
Standards Overview

Expanded:
Standards Overview
Standards Overview text

Standards Overview
Assessment text

I'm not a programmer but I poked around in the HTML being output and it looks like around line 120, where it has this:
'#prefix' => '<div class="field-expander field-expander-' . $delta . '">',
the resulting output of more than one expander field shares the same number, so they both end up with "field-expander-0" as their class name. Not sure if that has anything to do with the duplicated titles but I did notice that.

Any help that you can offer for this would be greatly appreciated!

Thanks!

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States hot_sauce

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024