I'm trying to design a form that creates a post, with the help of Advanced Custom Fields (ACF).

The post has a custom post type of 'movie' and has custom fields of type 'relationship' that link to other posts of type 'genre'.

I use this code for the form


    'post_id' => 'new_post',
    'post_title' => true,
    'new_post' => array(
    'post_type' => 'movie',
    'post_status' => 'publish'
    'submit_value' => 'Create a new movie'

which makes a form like this

enter image description here

but 'the Movie Genre' field isn't working, Thanks in advance for your time any help or suggestions are much appreciated.

  • Can you clarify "'the Movie Genre' field isn't working"? – nmr May 17 '19 at 7:27

If the values do not load there is either an error in JavaScript or an error in PHP during hte AJAX request.

JavaScript errors are usually caused by plugin conflicts. To begin debugging this start disabling other plugins to see if you can clear it up.

PHP errors during AJAX can be found by enabling error logging https://codex.wordpress.org/WP_DEBUG

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.