Last active
October 27, 2016 18:09
-
-
Save christianmagill/6c3f6c6a21133474b9d6b675b98eeba6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function acf_form_field_load( $field ) { | |
$field['choices'] = array(); | |
$forms = RGFormsModel::get_forms( null, 'title' ); | |
$field['choices'][''] = '- Select Form -'; | |
foreach ( $forms as $form ) { | |
$field['choices'][ $form->id ] = $form->title; | |
} | |
return $field; | |
} | |
add_filter( 'acf/load_field/name=form', 'acf_form_field_load' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment