Skip Navigation

[Resolved] Changing CPT fields structure, will it hurt my data?

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 5 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#1370309

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.

#1370537

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.

#1370979
Post Field Group_2.jpg

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?

#1372041

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