Suggest_field not working with custom taxonomy

Hey guys,

I have a custom taxonomy (videos), and suggest_field using fl_as_terms isn’t working.

Here is my code:

FLBuilder::register_module('ShowCat', array(
    'general'       => array( // Tab
        'title'         => __('General', 'fl-builder'), // Tab title
        'sections'      => array( // Tab Sections
            'general'       => array( // Section
                'title'         => __('Settings', 'fl-builder'), // Section Title
                'fields'        => array( // Section Fields

                    'suggest_field'  => array(
                        'type'          => 'suggest',
                        'label'         => __('Find Video', 'fl-builder'),
                        'action'        => 'fl_as_terms',
                        'data'          => 'videos'
                    ),
                    
                    'select_field2'   => array(
                        'type'          => 'select',
                        'label'         => __('Which Category is this in?', 'fl-builder'),
                        'default'       => 'residential',
                        'options'       => array(
                            'residential'      => __('Residential', 'fl-builder'),
                            'commercial'      => __('Commercial', 'fl-builder'),
                            'finance-101'      => __('Finance 101', 'fl-builder'),
                            'hear-from-the-experts'      => __('Hear From The Experts', 'fl-builder'),
                            'in-the-news'      => __('In The News', 'fl-builder'),
                            'our-team'      => __('Our Team', 'fl-builder'),
                        )
                    ),
                )
            )
        )
    )
));

Hey Dainis,

I’ve already assigned another member of the team to assist you with your concern. :slight_smile:

Ben

Hey Dainis,

The code looks correct, so there may be an issue somewhere else. Here are a few things to check…

  • Do you have a taxonomy called “videos” setup on your site using register_taxonomy?

  • Is the taxonomy slug “videos” or is it possible something else (like video)? The data attribute needs to be the term’s slug.

Have a look at those and let me know what you find.

Justin

Also be sure that the register_taxonomy function is hooked to the init action at a lower priority than the init function that registers your custom module.