Support

Account

Home Forums ACF PRO Dynamic Series of Select Menus

Helping

Dynamic Series of Select Menus

  • I have two select menus being dynamically populated. I’d like to change the values of the second select menu based on whatever is selected in the first menu.

    For example
    Menu one has car brands
    Ford
    Toyota

    Menu Two is the type of car.
    If they select Ford in the first menu, i’d like the second menu to show options as F150, Fusion.
    But if they select Toyota, the second menu should show Prius, Highlander, etc.

    I’m using ACF Pro and i’m not sure i see anything in the documentation that allows me to do this

    Thanks

  • There isn’t a lot of documentation or useful examples of doing what you want. I have created an example of how to do something similar to this, my example draws it’s information from post types, but it can be changed to other sources of information. The important part of the example is the JS code that gets the value from one field when it’s changed and hooks into the ACF ajax code to get the results to populate another select field with. Hope it helps https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-select-example

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

You must be logged in to reply to this topic.