Support

Account

Home Forums ACF PRO Select Field w/ PHP Generated Groups Reply To: Select Field w/ PHP Generated Groups

  • Oops, Spoke to early on a solution, Here’s the screen shot:

    Display of select field default_option populating select field choices.

    Here’s the code that is creating the field:

    array (
    	'key' => 'field_538f375f143cb',
    	'label' => 'Show Related Posts',
    	'name' => 'tmv_related_posts',
    	'prefix' => '',
    	'type' => 'select',
    	'instructions' => '',
    	'required' => 0,
    	'conditional_logic' => 0,
    	'choices' => array (
    		'none' => 'Do not show related posts.',
    		'category' => 'Show posts from Category.',
    		'tmv_feature_type' => 'Show posts from Features.',
    		'tmv_topic' => 'Show posts from Topics.',
    		'post_tag' => 'Show posts from Tag.',
    		'tmv_today_type' => 'Show posts from Today.',
    		'cl_category' => 'Show posts from Classifieds.',
    		'cl_job_field' => 'Show posts from Job Type.',
    		'tmv_sport_tax' => 'Show posts from Sports.',
    		'tmv_sport_team_tax' => 'Show posts from Teams.',
    		'tmv_business_news_type' => 'Show posts from Business News.',
    		'tmv_business_field' => 'Show posts from field.',
    		'tmv_fr_lake' => 'Show posts from lake.',
    	),
    	'default_value' => array (
    		'none' => 'Do not show related posts.',
    	),
    	'allow_null' => 0,
    	'multiple' => 0,
    	'ui' => 0,
    	'ajax' => 0,
    	'placeholder' => '',
    	'disabled' => 0,
    	'readonly' => 0,
    	),