Import data into ACF fields from .csv

Closed

Import WP Addon - Advanced Custom Fields Updated 1 year ago 12 Replies

martin asked 1 year ago on August 11, 2023 at 12:46 am

I have a field group with a few repeater fields in, gow cab I import the data into these fields?

J

James replied Support Agent

1 year ago on August 12, 2023 at 9:27 am

Hi Martin,

Are you able to export your acf field group? via ACF > Tools > Export so i can have a look at your setup?

James

mw

martin replied

1 year ago on August 12, 2023 at 9:55 am

Sure it’s the listings repeater field ( field_64d54d1f3be1b ) you need. So I want to be able to add more listings via your importer. [ { "key": "group_64c50fbf269ca", "title": "Directory", "fields": [ { "key": "field_64c54f2436960", "label": "Product", "name": "product", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0 }, { "key": "field_64c50fbf27fbc", "label": "Featured Products", "name": "products", "aria-label": "", "type": "repeater", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "acfe_repeater_stylised_button": 0, "layout": "table", "pagination": 0, "min": 0, "max": 0, "collapsed": "", "button_label": "Add Row", "acfe_field_group_condition": 0, "rows_per_page": 20, "sub_fields": [ { "key": "field_64c5100d27fbe", "label": "Dir Image", "name": "dir_image", "aria-label": "", "type": "image", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "uploader": "", "acfe_thumbnail": 0, "return_format": "url", "min_width": "", "min_height": "", "min_size": "", "max_width": "", "max_height": "", "max_size": "", "mime_types": "", "preview_size": "medium", "acfe_field_group_condition": 0, "library": "all", "parent_repeater": "field_64c50fbf27fbc" }, { "key": "field_64c5102f27fbf", "label": "Dir Product", "name": "dir_product", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64c50fbf27fbc" }, { "key": "field_64c5104627fc0", "label": "Dir Description", "name": "dir_description", "aria-label": "", "type": "textarea", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "acfe_textarea_code": 0, "maxlength": "", "rows": "", "placeholder": "", "new_lines": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64c50fbf27fbc" }, { "key": "field_64c5107e27fc1", "label": "Dir_Retailer", "name": "dir_retailer", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64c50fbf27fbc" }, { "key": "field_64c5109527fc2", "label": "Dir Buy Now", "name": "dir_buy_now", "aria-label": "", "type": "url", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "placeholder": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64c50fbf27fbc" }, { "key": "field_64c545d1c84d4", "label": "Product Rating", "name": "product_rating", "aria-label": "", "type": "select", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "choices": [ "0", "1", "2", "3", "4", "5", "6" ], "default_value": false, "return_format": "value", "multiple": 0, "max": "", "prepend": "", "append": "", "allow_null": 0, "ui": 0, "acfe_field_group_condition": 0, "ajax": 0, "placeholder": "", "allow_custom": 0, "search_placeholder": "", "min": "", "parent_repeater": "field_64c50fbf27fbc" } ] }, { "key": "field_64d54d1f3be1b", "label": "Listings", "name": "listings", "aria-label": "", "type": "repeater", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "acfe_repeater_stylised_button": 0, "layout": "table", "pagination": 0, "min": 0, "max": 0, "collapsed": "", "button_label": "Add Row", "acfe_field_group_condition": 0, "rows_per_page": 20, "sub_fields": [ { "key": "field_64d54d63d1074", "label": "Make", "name": "make", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64d54d1f3be1b" }, { "key": "field_64d54d86d1075", "label": "Model", "name": "model", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64d54d1f3be1b" }, { "key": "field_64d54d95d1076", "label": "Retailer", "name": "retailer", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64d54d1f3be1b" }, { "key": "field_64d54da3d1077", "label": "Price", "name": "price", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64d54d1f3be1b" }, { "key": "field_64d54db3d1078", "label": "Price URL", "name": "price_url", "aria-label": "", "type": "text", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "default_value": "", "maxlength": "", "placeholder": "", "prepend": "", "append": "", "acfe_field_group_condition": 0, "parent_repeater": "field_64d54d1f3be1b" }, { "key": "field_64d54dbed1079", "label": "Rating", "name": "rating", "aria-label": "", "type": "select", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "choices": [ "0", "1", "2", "3", "4", "5", "6" ], "default_value": false, "return_format": "value", "multiple": 0, "max": "", "prepend": "", "append": "", "allow_null": 0, "ui": 0, "acfe_field_group_condition": 0, "ajax": 0, "placeholder": "", "allow_custom": 0, "search_placeholder": "", "min": "", "parent_repeater": "field_64d54d1f3be1b" } ] }, { "key": "field_64c54d60217e5", "label": "Director Related Posts", "name": "director_related_posts", "aria-label": "", "type": "post_object", "instructions": "", "required": 0, "conditional_logic": 0, "wrapper": { "width": "", "class": "", "id": "" }, "post_type": [ "post" ], "post_status": [ "publish" ], "taxonomy": "", "return_format": "object", "multiple": 1, "min": "", "max": "", "save_custom": 0, "save_post_status": "publish", "acfe_add_post": 0, "acfe_edit_post": 0, "acfe_bidirectional": { "acfe_bidirectional_enabled": "0" }, "allow_null": 0, "acfe_field_group_condition": 0, "ui": 1, "save_post_type": "" } ], "location": [ [ { "param": "page_template", "operator": "==", "value": "directory.php" } ] ], "menu_order": 0, "position": "normal", "style": "default", "label_placement": "left", "instruction_placement": "label", "hide_on_screen": [ "block_editor", "comments", "the_content", "discussion", "excerpt", "featured_image", "send-trackbacks" ], "active": true, "description": "", "show_in_rest": 0, "acfe_autosync": "", "acfe_form": 0, "acfe_display_title": "", "acfe_meta": "", "acfe_note": "" } ] Thanks Martin On Sat, 12 Aug 2023 at 10:27, Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >
J

James replied Support Agent

1 year ago on August 13, 2023 at 9:26 pm

Hi Martin,

Are you able to attach the file onto the ticket, when pasting in that field group there are some errors.

James

mw

martin replied

1 year ago on August 13, 2023 at 9:37 pm

Sure, please find attached. On Sun, 13 Aug 2023 at 22:26, Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >
J

James replied Support Agent

1 year ago on August 14, 2023 at 8:29 pm

Thanks, if you add the following code to your website: https://www.importwp.com/docs/advanced-custom-fields-faq/#unable-to-find-acf-field-in-custom-field-list this will make the acf fields visible in your importer template as shown in the attachment.

mw

martin replied

1 year ago on August 14, 2023 at 10:29 pm

Hi, I've added the code to my functions.php [image: image.png] I cannot see the ACF fields I have created? [image: image.png] On Mon, 14 Aug 2023 at 21:29, Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >
J

James replied Support Agent

1 year ago on August 15, 2023 at 5:09 pm

Just to confirm that you have the importwp acf addon installed and active? https://www.importwp.com/integrations/advanced-custom-fields/

mw

martin replied

1 year ago on August 15, 2023 at 7:57 pm

Hi James, I’ve added it, what I need to do is now export the data in the fields under the directory, i’ve attached a screenshot of my settings, do you know what I am doing wrong? Thanks Martin On Mon, 14 Aug 2023 at 21:29, Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >
J

James replied Support Agent

1 year ago on August 15, 2023 at 9:22 pm

Hi Martin,

Attachments via email, dont seem to be added to the ticket, can you add your attachment via the web form: https://helpdesk.importwp.com/ticket/2d03f1ea-059d-4dbd-8425-fec6aba255f2/

 

mw

martin replied privately

1 year ago on August 15, 2023 at 9:50 pm

J

James replied Support Agent

1 year ago on August 17, 2023 at 8:47 pm

Hi Martin,

Does your server have any error logs from around the time that error was triggered, if not could you clear your logs, enable error reporting, and re run the export, and attach the logs to this ticket.

James

mw

martin replied

1 year ago on August 17, 2023 at 8:57 pm

No logs recorded, i'll try again over the weekend. On Thu, 17 Aug 2023 at 21:47, Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >