Jump to content

Collapse the elements in repeater


yesjoar
 Share

Recommended Posts

Hi there.

An other question today.

I have a really big repeater-field.

So now I add a new repeater-element and all my fields are displayed. Thats ok.

But I need an option to hide the repeater-element.

So, when I create 3 repeater-elements my page is too long.

I want a click on my repeater-element and then the fields are displayed.

(And now, I don't wanna hide the repeater himselfs at first.)

Any ideas, how I can handle this?

y.

Link to comment
Share on other sites

I have no idea what you're talking about. Maybe screenshots will help.

You can collapse fields by default, or when they're empty or filled in the field settings. Is that what you're looking for. Do you mean to collapse the repeater fieldset by default, like the one for fields?

Link to comment
Share on other sites

You have to go to those fields settings, and in the tab INPUT, set their visibility to "Always collapsed, requiring a click to open". You can also do it only in the context of the repeater by clicking on the field name on the reapeater DETAILS area.

edit: hm... that was for the fields, not the repeater itself. Ignore it.

  • Like 1
Link to comment
Share on other sites

There's currently no option for that as far as I know. But I think it would be possible to implement.

For now you could add something like this to your inputfields.js of the admin theme, "teasers" being the field name of the repeater.

$('#wrap_Inputfield_teasers ul.Inputfields.ui-sortable > li').addClass("InputfieldStateCollapsed");
  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Hi there,

tried to add the code in the inputfields.js - but in my case (maybe this was changed in PW 2.5+ ?)  PW is using the inputfields.min.js - so I had to add it there.

BTW: +1 vote for such an option in the settings (Show repeater items collapsed/open) !

And what else would be really great - im my opinion:

1. A possibilty to add an alternative singular version of the Label (e.g. Repeater Label = "Slides" / Element Label ="Slide")

2. The possibility to set a limit of elements in a repeater

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...