Support

Account

Home Forums Add-ons Repeater Field Nest existing repeater inside new repeater, retaining field values Reply To: Nest existing repeater inside new repeater, retaining field values

  • Hi @moettinger

    That’s a tough one.Sub field values are saved to wp_postmeta etc. in this way: repeater_field_name_0_sub_field_name with 0 ticking upwards with each row.

    With an repeater inside another repeater I think it’ll be:
    repeater_field_name_0_sub_repeater_field_name_0_sub_field_name

    Since you now initially want to put your repeater in another repeater I’m assuming the whole current repeater should go as the first row (I.E. 0).
    You’d probably have to do some clever SQL queries to change the values of each repeater_field_name_0_sub_field_name into repeater_field_name_0_sub_repeater_field_name_0_sub_field_name

    but you’ll also first have to make sure atleast 1 row has been previously created in the root repeater. If you check the DB you’ll see that the repeater fields only contain a count (starting at 1) of how many rows they contain so just running an SQL for the above will not cause the values to show up.

    Hope I got you started! It’s not an easy topic to tackle 🙂