acf-dynamic-ajax-select-example icon indicating copy to clipboard operation
acf-dynamic-ajax-select-example copied to clipboard

[dynamic-select-example] City not being saved

Open cpuch opened this issue 6 years ago • 4 comments

Hello,

I've followed your tutorial but the city is not being saved

cpuch avatar May 04 '18 15:05 cpuch

Did you ever figure this out? I'm having the same issue.

jcbaldoni avatar Jan 28 '21 19:01 jcbaldoni

Having the same issue, any update on this one ?

FunkyCss avatar Jun 20 '21 19:06 FunkyCss

I do not know of any reason that the selected city value should not be saved. What could cause this is that the selected value is not available as a choice when the page is generated. This should only happen the function get_cities() does not returne the selected city as a choice. https://github.com/Hube2/acf-dynamic-ajax-select-example/blob/4c3259db957386c53d694f0c92c2e0077ac7b25e/dynamic-select-example/my-acf-extension.php#L130

Are you using a post object field for both state and city? Have you added the relationship for state in the city post?

Hube2 avatar Jun 21 '21 11:06 Hube2

Hey there actually it works, I just had to change some things on my beta environment.

Looks everything OK to me now except as you said the JS part that needs to be created with the new ACF JS.

Thanks for the feedback

FunkyCss avatar Jun 21 '21 13:06 FunkyCss