Home Forums General Issues ACF field in Javascript file


ACF field in Javascript file

  • Hi!

    I’m wondering if there is a quick way of getting fields in to a js file.

    I have a options page made with ACF and I need the fields to be available for ex. a slider.

  • Hi @robin-nilsson,

    Thanks for the post.

    Your question is not quite clear, would you like the field settings or the actual field values onto the file?

    ACF field values can be obtained from the $_POST data as $_POST[‘acf’][field_key]

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘ACF field in Javascript file’ is closed to new replies.