Forums › Forums › Search & Filter Pro › Issue with ACF field when using dropdown logic & mutliple same name fields
Tagged: V3
- This topic has 12 replies, 3 voices, and was last updated 4 years, 8 months ago by Ross.
-
Anonymous(Private) February 19, 2020 at 10:25 am #234309
I have an issue with ACF label & value sync.
I have an ACF field group where I’m using logical ACF field conditions to display subsequent dropdown.
I have a parent dropdown name REGIONE having 20 values, the ACF field name is acf_leads_regione
For each REGIONI value I have a ACF son field named PROVINCIA (so I have 20 dropdown sons having the same acf_leads_provincia ACF field name, but different values inside): using the ACF logic I can associate and show the right PROVINCIA dropdown when selecting each REGIONE value.
The issue is that (with this ACF working configuration) if I set “is ACF field” for the PROVINCIA search filter, I get the correct pair “label + value” in search dropdown, but the filter keeps the values list ONLY coming from the first acf_leads_provincia ACF field in the list (and doen’ts condier the other 19 field having the same field name), so it shows values coming from ONLY ONE “PROVINCIA” ACF field
If I unset the “is ACF field”, the filter gets ALL the 20 acf_leads_provincia fields values, but it’s unable to get the pair “label + value” from ACF, and the dropdown filter shows the values and not the labels
Can you please verify and fix this?
Waiting for you kindly reply asap, I must open the site and start to work with it.
Thank you in advance
RegardsTrevor(Private) February 20, 2020 at 10:04 am #234449Hi
In the Field Group, you have defined the Provincia field many (20) times. I do not think you are supposed to do this, as they all have the same field slug/name, but they connect differently to the ACF definitions. If I change the field source to
_acf_leads_provincia
instead ofacf_leads_provincia
I can then see that each one has a different connecting meta key:https://www.screencast.com/t/c7pASXMNA
With ACF it makes 3 meta keys per field, like this (in this example for a field named ‘Land’):
#1
_land
#2field_52f0fc4334f52
#3land
In our Post Meta form object Meta Key selection list, you have correctly used key #3, without the underscore at the start of the key name. The problem is, our plugin expects just one field for #2 and one field for #1, but in fact there are more.
I need to refer this to our plugin author, Ross, for his input.
Anonymous(Private) February 21, 2020 at 1:59 pm #234590This ACF configuration works as expected with all other plugin we are using in this site, it has been used to get working the State -> City logic and assign the correct City values when choosing each State value. I presume you should consider our ACF setting as right and solve the mentioned issue.
-
AuthorPosts