Support

Account

Home Forums Feature Requests Remove the Repeater field type (sorta)

Helping

Remove the Repeater field type (sorta)

  • I believe with just one UI tweak Flexible Content can serve as a complete replacement for the Repeater field type.

    As I understand from this comment by Elliot, the backend for the field types is already extremely similar:

    Both field types save the sub field data in the same way, the only difference is the way they save their own reference data … The repeater field will simply save a number like so: 3 … The flexible content field does not save just a number, instead it save’s an array of ‘layout’ names like so: array(‘content’, ‘images’, ‘download’)

    On the frontend, they are also similar, with two notable differences (that I can detect):

    1. Flexible Content allows rows to be collapsed. This makes rearranging very reliable. Rearranging Repeaters, however, can easily become difficult with a lot of fields (i.e. tall rows), since you have to master scrolling while dragging.
    2. Flexible Content shows a layouts popup menu when you click Add Row while Repeater just immediately adds the row.

    My change proposal: If a Flexible Content field only has one layout defined, clicking Add Row should immediately add the row (using the only defined layout) the same way Repeater works.

    Now, I acknowledge actually removing a field type from the plugin is probably a non-starter 🙂 But from my perspective as a developer, making this UI change to Flexible Content will mean I won’t need to make the early decision between using Repeater or Flexible Content: I can just use Flexible Content and I’ll get the simpler one-click Add Row without giving up the development flexibility of adding layouts in the future.

  • I can see where you’re coming from, but there is also another significant difference between a repeater and an flex field. Each row of a flex field can have completely different sub fields where a repeater always has exactly the same sub fields. For me this is the important deciding distinction/factor when deciding whether to use a repeater or a flex field.

    Also, repeater fields can be collapsed and if you’re going to have enough rows in the repeater to need to scroll and drag when collapsed your going to have just as many collapsed flex fields rows to deal with and still need to scroll while dragging.

    At any rate, if you want to get this suggestion to the developer then you should open an support ticket here https://support.advancedcustomfields.com/new-ticket/

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

The topic ‘Remove the Repeater field type (sorta)’ is closed to new replies.