I have a repeater field in a CPT "Itinerary". in it there is a title, image, text, etc.
The field represents an itinerary for one day. Now, I need to place the itinerary field, in another repeater field - "Day", so that there will be an option to add a day, and within it - a different itinerary i.e.
Day 1
- Itinerary item (title, image, text)
- Itinerary item (title, image, text)
- Itinerary item (title, image, text)
Day 2
- Itinerary item (title, image, text)
- Itinerary item (title, image, text)
- Itinerary item (title, image, text)
...
The site is live, And the CPT that has the Itinerary repeater field already has data. e.g
hidden link
Will changing the field structure couse data lose? Wht is the best way to do it?
Thanks.
Can you elaborate what a repeater field is?
In Toolset only Repeatable Field Groups and Repeating Fields exist, but no repeater field.
I assume, you mean the Repeatable Field Group?
Now, when a Field is added to a Repeatable Field Group, and some Posts are created and some of those fields (in Repeatable Field Groups) are filled, they will be saved for that Post.
You cannot re-assign a Repeatable Field Group to another Post type. It will be assigned to one and only that one Post Type you chose while setting it up.
The Post Type of Field Groups cannot be changed as long as Repeatable Groups or Post Reference fields are used within a Post Fields Group.
You can nest Repeatable Field Groups, within each other, and add or remove fields as you like in the Repeatable Field Group.
If you already have posts with this data saved, and now for example Create a new Repeatable field Group in the Post Field Group and then move the original Repeatable Field Group into the new one, a warning immediately will tell you that moving repeatable group to a different group will remove all data created with this group.
This cannot be undone!
Hence, concluding, you cannot do this without loss of data.
I however am not 100% sure I understood the workflow you want to take adequately, so if I misinterpreted something, please let me know in order to get back to you with more precise details.
I meant "Repeatable Field Group" (see screenshot)
I need to place the "Itinerary" (Repeatable Group)", in the "Day (Repeatable Group)". Is this possible? will there be data loss?
No, it's not possible.
As soon you actually drag and drop the field you'll get a warning, you can try it, nothing will happen just yet but the warning will appear as elaborated here:
https://toolset.com/forums/topic/changing-cpt-fields-structure-will-it-hurt-my-data/#post-1370537