Home Forums Feature Requests Repeater field : duplicate row Reply To: Repeater field : duplicate row

  • I’ve actually looked at it a couple of times. On of the complex parts for me is where to put the button and what icon to use. I keep hitting a brick wall here because there really isn’t anywhere to put it. Over on the right you have the + and – buttons and these just barely fit on a collapsed row. On the left you have the collapse icon and the row counter, again these barely fit when the row is collapsed.

    Take a look at the layouts and the CSS involved and come up with a plan. I’m also working on a project right now where this would be extremely useful.

    Here’s what would be involved when the button is clicked, and the complexities listed her might give you some idea of why Elliot hasn’t added something like this. It’s far from simple.

    1. Find the next row, if the isn’t a next row find the clone row
    2. trigger a click on the add row button of the next row or the main add row button if using the clone row.
      • This is going to need to be recursive if there’s a nested repeater
      • Going to get even more complicated if there is a flex field nested in that repeater
      • It going to get even more complicated if there are clone rows
    3. get the values of the fields in the current row and insert them into the new row that was added

    For my current project I’m going to be building something that only deals with repeaters and nested repeaters, because that’s what I need. Also, the types of fields that it deals with in those repeaters will be limited and fairly simple.