Collapsable Text

I am trying to use collapsible text in repeaters. I managed to create them, However when one clicks on the more the extra text does not show. Any help please?

https://www.justsportsmalta.mt/products

Hi, pierresciberras !!

Is the action set to “Expand” when clicked for the collapsible text? :thinking:

Yes please. There are some fields which has more characters and till now I cannot manage to have it working

I personally think that having a large number of items displayed in the repeater and the expanded text being large could be causing some issues. How about temporarily reducing the number of items loaded in the repeater to one and checking if the “Read More” functionality works? :thinking: And, please also try temporarily reducing the amount of text that expands at the same time for testing.

here iam initially assigning first 40 letters, once user click readmore button iam assigning full description to text field
$w(“#myRepeater”).onItemReady(($item, itemData, index) => {
$w(“#myRepeater”).forEachItem(($item, itemData, index) => {
//assigning first 40 letters to text element
$item(“#text”).text = itemData.description.substring(0, 40);
$item(‘#readmore’).onClick(()=>{
//assigning full description to text field
$item(“#text”).text = itemData.description;
//hide read more button
$item(‘#readmore’).hide();
})
});
});

Hi. I just had the same problem in WIX Editor and somebody in here already mentioned the following as a solution.

I wanted to add collapsible text to a repeater and it was also supposed to connect to a longer text in a dataset (CMS). The way I solved it was:

  1. You add the collapsible text to the repeater and go to change text (i.e. textbox settings). THE DEFAULT SETTING for the question “what does the button do?” is that it LINKS to something. You need to change this setting to EXPAND.

  2. Once you have changed to EXPAND you can either manually add the text within each repeater item or connect it to a dataset in the CMS as I did. Both ways work as long as you change the initial setting from Link to Expand.

good luck :slight_smile:

Where exactly are you using the captioned scenario on the site?
You gave the products page URL, which is the Wix Stores solution. Are you referring to the products page where the product description is too long and you want an expand and collapse logic?
Why don’t you take advantage of the additional section information where an accordion will get activated and address your concern for the products page?