This plugin is outdated and might not be supported anymore
ACF Dynamic Choices

ACF Dynamic Choices

Details
View on WordPress

If you’ve ever needed your ACF choices to be dynamically generated by a SQL query, this plugin will help you get the job done.

You can mix and match static choices with dynamic, SQL-based choices by placing as many regular choices in the list as you’d like, followed by the special %%QUERY%% choice that will tell this plugin to load choices dynamically from the database.

An example on how to list users, setting the id as the value, would look like this:

%%QUERY%% : SELECT user_nicename AS text, id AS value FROM wp_users

Arbitrary section

Details

Plugin code:
acf-dynamic-choices
Plugin version:
.5
Outdated:
Yes
WP version:
3.0.1 or higher
PHP version:
or higher
Test up to WP version:
3.9.40
Total installations:
10
Last updated:
2014-07-16
Rating:
Times rated:
1
acf
dynamic
query
sql