Skip Navigation

[Resolved] Convert ACF fields to Toolset

This thread is resolved. Here is a description of the problem and solution.

Problem: I have several custom fields that I created in Advanced Custom Fields. I would like to control those fields with Toolset Types.

Solution: Simple custom fields are convertible, but complex custom fields like those that offer a selection or a date are not compatible with Types and must be recreated.

Relevant Documentation:
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/

This support ticket is created 5 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 15 replies, has 2 voices.

Last updated by winyS 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1090255

Hi,

I have the same issue, as this topic:
https://toolset.com/forums/topic/need-to-move-content-from-acf-custom-fields-to-toolset-custom-fields/

After converting some ACG fields with this tutorial
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/
the fields appear, but they are all empty.

How can I convert the ACF fields with their content?

The link to my site: hidden link

#1090309

Hi, can you tell me:
- What type(s) of custom fields are you trying to convert?
- Are any fields working correctly, or are all fields having problems?
- When you say the fields appear but are empty, are you saying that posts that previously had values for these custom fields no longer have values for these custom fields after conversion? Or are you saying that some of the options for some custom fields are not appearing in the post editor screen?

#1090343

- What type(s) of custom fields are you trying to convert?
I tested 2 fields, both single lines of text.
- Are any fields working correctly, or are all fields having problems?
Both have problems.
- When you say the fields appear but are empty, are you saying that posts that previously had values for these custom fields no longer have values for these custom fields after conversion?
Yes.

#1090423

Please go to Toolset > Custom Fields and click "Post Field Control". Find the two fields you created in ACF. Take a screenshot showing both fields, if possible, and include that image in your next reply so I can see the configurations for these fields. Please let me know the field slugs corresponding to the fields you converted. I'll take a look and we can go from there.

#1091202
Schermafdruk 2018-08-24 11.46.41.png

Hello Cristian,

I attached the screenshot you asked for.

field_5072b01ca4368 is the name (Naam contactpersoon)
field_5072b5a205fa2 is the city (Plaatsnam woongroep).

What I try to create is a map with markers to display all custom post types of "Woongroepen".
There are existing ACF fields for Address (street+number), Postal code and City. 3 fields with single line of text.

I already succeeded to create the map with markers for the field "city", and it works when I manage the field with Types and also when I do not manage the field with types. So it is possible to display ACF fields in a Toolset view.

Test page with map: hidden link

Now I would like to specify each marker for street address and/or postal code to show the exact location.

Maybe I don't have to convert the ACF fields to toolset to achieve this?

But it is strange that the conversion showed empty fields.

I also add a screenshot of these empty fields.

#1091207
Schermafdruk 2018-08-24 12.01.52.png

The second screenshot is here:

#1092323

Thanks for the additional information. May I log in to your wp-admin area to take a closer look? I would also like to create a clone of your site so I can run some tests locally. If that's okay with you, please provide login credentials in the private reply fields here.

#1092411

Sorry, I see an error message when logging in:
FOUT: Gebruiker is niet geactiveerd

Can you check?

#1092957

I can send you new login details. Can you tell me how I can send them private?

#1093153

Private fields are enabled again here.

#1093259
Screen Shot 2018-08-27 at 4.05.08 PM.png

Okay I was able to download a clone of the site and work locally, and I think I understand the conversion problem. Please go to Toolset > Post Fields > Post Field Control. It looks like you were modifying the wrong fields. Go to the second page of results and look for lvgo_naam_contactpersoon and lvgo_plaatsnaam_woongroep. These are the two fields that should be managed by Types. I am attaching a screenshot here.

* Marker points to City (“Woonplaats”) (1 field) only, should point to full address adres (composed by 3 existing ACF fields: City, address and/or postal code).
Toolset Maps address fields are not split up into different pieces like this, so the Marker field shortcode is not designed to accept more than one field source. In Toolset it's best to create one single address field that holds the complete address, city and postal code. If you do not convert these separate fields to single Toolset address fields, other Toolset Maps features will not work. For example, Views filtered by distance will not work. Marker clusters and marker Spiderfying will not work with separated address fields. My best advice is to combine the address, city and postal code into a single Types address field.

#1095945
Schermafdruk 2018-08-30 12.16.24.png

Hi Christian,

* It looks like you were modifying the wrong fields. Go to the second page of results and look for lvgo_naam_contactpersoon and lvgo_plaatsnaam_woongroep. These are the two fields that should be managed by Types. I am attaching a screenshot here.
OK I understand this.
I converted one single line field and that worked fine.
But converting a select field (for example lvgo_status_woongroep), this is converted to a single line field instead of a select field.

* My best advice is to combine the address, city and postal code into a single Types address field.
I assume I have to do this manually for every custom post? I tried with 2 posts and it works fine.

Now I want to display different markers for different posts, based on the content of the select field lvgo_status_woongroep. Somelthing like this tutorial: https://toolset.com/forums/topic/different-marker-image-in-a-single-map/.

I think it makes more sense to replace the select field by a custom taxonomy "status woongroep" with 3 terms. I already created this custom taxonomy and populated it in 2 custom posts.

But what code do I have to add to my view to display the different markers?
I attach a screenshot of my view (not yet displaying correctly) and the url to view: hidden link (concept, you have to login first)

#1096258
field-types.png

But converting a select field (for example lvgo_status_woongroep), this is converted to a single line field instead of a select field.
Correct, some fields in ACF have a considerably different data format and are not compatible with Toolset. Simple value fields are supported best, choice and date fields are not supported. Those fields should be recreated in Types for best results.

#1096296

Hi Christian,

I think the ACF fields conversion problem is solved now.

Can you please respond to my latest questions:

I want to display different markers for different posts, based on the content of the select field lvgo_status_woongroep. Somelthing like this tutorial: https://toolset.com/forums/topic/different-marker-image-in-a-single-map/.

I think it makes more sense to replace the select field by a custom taxonomy "status woongroep" with 3 terms. I already created this custom taxonomy and populated it in 2 custom posts.

But what code do I have to add to my view to display the different markers?
I attach a screenshot of my view (not yet displaying correctly) and the url to view: hidden link (concept, you have to login first)

Thank you.

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/different-marker-icons-based-on-taxonomy/

#1096366

Let's follow up in the other ticket, since it's a separate issue. We try to limit each ticket to one problem. Thank you!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.