Support Forum
Support › Meta Box Group › Import format for clonable fieldResolved
Hello,
We have a custom post type called Disease with a custom field called "Symptom". There will be many symptoms for each Disease. All of this seems to be working fine. Now we need to figure out how to import the data. Importing diseases through WP All Import via csv is easy. But how to import the Symptoms? What format in the csv file should the symptoms be?
Hi,
If you’re going to import/export simple fields (like text, select, radio, checkbox, etc.), then you can use these plugins to do the job:
https://wordpress.org/plugins/wp-ultimate-csv-importer/
https://wordpress.org/plugins/wp-ultimate-exporter/
For complex fields, we need to code for the integration. We’re still working on it.
Refer
https://support.metabox.io/topic/import-images-into-custom-table/
https://support.metabox.io/topic/select-advanced-for-woo-products/
Hi Thanks for your response and for the links. Yes, we are already using wp all import so we are aware of how to import data. The question was specifically about claneable fields. What is the format? How are values separated? Can they be imported in one cell with seperators like commas? Or do they need their own file?
Hi,
I think the format like the serialized string in the database, for example
a:2:{i:0;s:5:"text3";i:1;s:5:"text4";}
You can try to use the plugin WP All Export to export the data with custom fields then re-import it.
Ok thanks I'll try the export
It's been 2 years..
I hope this helps someone with a similar use case to mine - using cloneable fields with text fields.
I've created a CPT with a cloneable text field to add phone numbers. And settled on using WP All Import Pro to import my CSV, instead of WP Ultimate CSV Importer (will explain why after this).
I found a snippet in WPAI's documentation to "Convert Comma-separated List into Serialized Array" (https://www.wpallimport.com/documentation/code-snippets/#comma-separated-data-to-serialized-array) and this code works too by replcing the comma with a pipe character.
So in my CSV with the column with multiple phone numbers, I separated each of it with a pipe character.
In WPAI, imported the CSV, configured my Custom Field, followed the snippet, replaced the comma with pipe character in the Function Editor, ran the import and lo-behold it worked!
Now, why didn't I use the other importing plugin?
In conclusion, due to the lack of documentation, I just couldn't use that plugin.