Toggle Forms

Hey guys

It appears I cannot toggle forms? With my code the toggling of custom_post_type field is working, but not manual_gallery, is this a bug, I am doing something wrong, or just not something come up as required before?

'post_select'    => array(
                        'type'          => 'select',
                        'label'        => __('Post Type', 'fl_builder'),
                        'options'       => array(
                                'core'  => 'Standard Posts',
                                'cpt'   => 'Custom Post Types',
                                'new'   => 'New',
                            ),
                        'toggle'        => array(
                            'core'        => array(
								'fields'        => array(),
							),
                            'cpt'        => array(
								'fields'        => array('custom_post_type'),
							),
                            'new'        => array(
								'fields'        => array('manual_gallery'),
							),
						)
                    ), // end post_select
                    
                    'custom_post_type'    => array(
                        'type'          => 'select',
                        'label'        => __('Choose Post Type', 'fl_builder'),
                        'options'       =>  choose_post_types(), 
                    ), // end custom_post_type
                    
                    'manual_gallery'    => array(
                        'type'          => 'form',
                        'label'        => __('Image', 'fl_builder'),
                        'form'          => 'gallery_content', 
                        'preview_text'  => 'label',
                        'multiple'      => true
                    ), // end manual_gallery

Hey Jon,

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

Ben

Hey Jon,

I believe this is something that has not come up as required before. Also, the issue looks to be with multiple fields in general, not form fields.

I dug through the code and unfortunately, it’s not a quick fix. For now, could you try possibly adding that field to it’s own section without a title and toggling the section? That should work, but let me know if it doesn’t. You could also write some custom toggle JS in the settings.js file.

Justin