@davenoham, I was originally trying to build a drag and drop theme builder with this code and I gave up on the project because it became too complex. Instead I found Elementor and haven’t looked back. Sorry I can’t help you more.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users