Support

Account

Home Forums ACF PRO Repeater Column Headers Floating or On Bottom

Solving

Repeater Column Headers Floating or On Bottom

  • Is it possible to have the column headers in a Repeater float above the columns so that they are always on the screen? Even when there is a really long number of rows?

    If not, is there a way to have the column header at the bottom of the columns too?

    I am doing a schedule of employees with a repeater. Columns are:

    Name
    Monday
    Tuesday
    Wednesday
    Thursday
    Friday
    Saturday
    Sunday

    Name is a text field and the others are checkboxes where you can choose Day and/or Night. There are over fifty employees so when you get into the middle of them you lose the column headers. If I could make them in a floating DIV, they could be on the screen all the time.

  • Simple answer is no.

    Complex answer that I can explain but I don’t have an example or code for. You could add custom JavaScript to the admin that detect when the header row of the repeater field hits the top of the screen and then fixes the position at the top of the screen. You’d also need to detect when to unfix the position of the field. Like I said, knowing what to do and doing it are two different things.

    Unless you’ve already done the display of this repeater field you might try a different solution. For example instead of a table with one field for each day you could have a single checkbox field with each day as a choice. Then you’d see all the days listed for each name. You could also mess with the width of each subfield and the display properties to display the day chechboxes next to the names.

  • That’s what I figured. What I’ve done is label them:
    [ ] Mon DAY [ ] Mon NIGHT

    Then I have it display as Rows which makes for a VERY long page, but works well on iPhone.

    Any plans on making the header floating in future versions? Responsive views for desktop, tablet and phone?

    When set to table mode it cuts off when phone is vertical.

    Is there a way to sort the repeater fields by name alphabetically? Meaning I add a name and instead of dragging it into alphabetical order in the CMS, it will automatically make it alphabetical on Update?

  • I’m not the developer, so I can’t say if this is something that could be added. I will mark this thread for his attention and if he has time he might comment.

    As far as sorting a repeater, there is a how to on that here http://www.advancedcustomfields.com/resources/how-to-sorting-a-repeater-field/

  • That’s a great guide for the front end, which I will definitely use. I am looking to sort the records on the BACK end. So instead of dragging a long list of names into alphabetical order, it automatically alphabetizes when the page is updated.

  • I’m going to start a new thread for this question since it is different than my original one.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Repeater Column Headers Floating or On Bottom’ is closed to new replies.