Home Forums Add-ons Repeater Field Get repeater field values via Ajax


Get repeater field values via Ajax

  • I have simple question.

    Is it possible to get repeater field values via AJAX?

    I have repeater field which carries image fields and single line text fields(for img caption).
    Let’s say I have 18 images and I want to display five images each time by hitting ‘Load’ button somewhere in my HTML.

    Any help or helpful topic or link appreciated.

  • Yes, it is possible. You would need to pass the post ID to your function so that it could get the next item. Along with which you want to get.

    A better choice, I think, than ajax would be to add it with just JavaScript. You could create a script that swaps the image and then using wp_localize_script() you can add information about all of the images.

  • Hi @nori2tae did you come up with something? Would be nice to see how you managed to do this.

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

The topic ‘Get repeater field values via Ajax’ is closed to new replies.