Could you please tell me what’s wrong with that code? Which section is not working? Could you please test each logic so we can know which part of the code that doesn’t work as it should be. Also, please check this page about debugging ACF: https://www.advancedcustomfields.com/resources/debug/?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users