Skip Navigation

[Resolved] Options for migrating data between field types?

This support ticket is created 2 years, 6 months 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by michaelS-53 2 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#2421083

On my site, I have a custom field set up as part of a group that is a "single line" type. Early on, I wanted this field this way to allow people to type different game genres in here. Now, we have a set list of genres and I'd rather this field be a checkbox, to prevent new genres being added or typos being introduced.

I originally came here to ask why converting the field showed "not allowed," but based on these threads:
https://toolset.com/forums/topic/change-field-type-on-form-from-single-to-select/
https://toolset.com/forums/topic/change-field-type-for-the-field-not-working/

I'm guessing this is the same issue? Basically, I can't convert "single line" to "checkbox" because the data is stored differently in the database?

If that's the case, I understand I can simply make a NEW checkbox field and set the values... but I have 4114 posts of this type, so is there any way to migrate the content/data from the "single line" field to a new "checkbox" one, besides doing it manually?

#2421377

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Checkboxes fields are special fields whose data stored as serialized array within the database that is why its not possible to migrate to that field type.

If you want to import content to such special fields like checkboxes, the only way is you should import the posts using the CSV importer pro plugin or wp all import plugin that supports the checkboxes field.
- https://toolset.com/course-lesson/import-csv-ultimate-csv-importer-plugin/
- https://toolset.com/course-lesson/how-to-import-data-from-a-csv-file-using-the-wp-all-import-toolset-types-add-on-plugin/

I suggest you should raise your concern or requirement with their support and check with them what will be the optimized way to import such custom field content.

#2423357

Okay, thank you for both the clarification, and suggestions on ways I can still possibly do what I'd like. Much appreciated. 🙂