Skip to content

Examples of dynamically loading values with AJAX based on other fields

Notifications You must be signed in to change notification settings

robisonweb/acf-dynamic-ajax-select-example

 
 

Repository files navigation

ACf Dynamic AJAX Field Examples

MANY OF THESE EXAMPLES CURRENTLY DO NOT WORK WITH ACF >= 5.7.0 AND NEED TO BE REWORKED FOR THIS VERION. THE ONES THAT HAVE BEEN REWORKED HAVE NOTES ABOUT IT. THERE WAS A SIGNIFICANT CHANGE IN ACFs JS API IN VERSION 5.7.0

These examples only works in ACF5

This repo contains several examples of using AJAX to dynamically load fields based on the values in other fields. See the individual example folders for more information.

There are also some other examples here that are more complicated than what can be found in my ACF Filters & Functions Repo becuase each of these examples requires code in several files.

The following is a brief explanation of each example

dynamic-fields-on-relationship: This example shows how to load additional fields from a post selected in a relationship field.

dynamic-repeater-on-category: This example is a bit more complicated than the ones below. It will load a repeater field located on a post with values from a repeater field of the chosen post category.

dynamic-select-example: updated JS to work with ACF >= 5.7 Load values into a select field based on a choice made in another select field

dynamic-text-based-on-user-select: Loads text fields based on the selection made for a user field

repeater-ajax-load-more: This is an example of how to create a "Load More" feature for a repeater field.

unique-repeater-checkbox: updated JS to work with ACF >= 5.7 This example shows how to create a true/false field in a repeater that will only allow the field to be checked in one row of the repeater. A multi-row radio field.

About

Examples of dynamically loading values with AJAX based on other fields

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 58.6%
  • JavaScript 40.8%
  • Hack 0.6%