The code you posted practically crashes my browser. You’re going to have a hard time getting anyone to crawl through all that code on this forum since it is mostly other users that are answering questions.
If you can narrow this down to a much simpler example that causes the same issue you might have better luck getting help.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Clients need flexibility. Developers need a repeatable workflow that doesn’t have a steep learning curve. See how digital marketing agency Noiza found both with Advanced Custom Fields in our latest case study.https://t.co/BxQAy6COJt