Define default settings for modules and rows

Hi there! I’m trying to define default settings for the button module so that I don’t have to keep setting the styles each time I add the button module. Here’s what I’ve got:

add_filter( 'fl_builder_settings_form_defaults', 'click_bb_button_default_colors', 20, 2 );
function click_bb_button_default_colors( $defaults, $type ) {
    if( $type == "button-module" ) {

        // These work
        $defaults->bg_color         = "d43c67";
        $defaults->bg_hover_color   = "000000";
        $defaults->text_color       = "ffffff";
        $defaults->text_hover_color = "ffffff";

        // This doesn't
        $settings->border['style']  = 'none';
        $settings->border['radius'] = array(
            'top_left'     => $btn_border_radius,
            'top_right'    => $btn_border_radius,
            'bottom_left'  => $btn_border_radius,
            'bottom_right' => $btn_border_radius,
        );

    }

    return $defaults;
}

How can I set the border style and radius for the button module please?

I would also love to know how to define default padding values for rows.

Thank you!

There’s an option for the buttons default in BB Theme > Customizer.

where does $settings come from and $btn_border_radius?

add_filter( 'fl_builder_settings_form_defaults', 'click_bb_button_default_colors', 20, 2 );
function click_bb_button_default_colors( $defaults, $type ) {
	if ( 'button-module' === $type ) {

		// These work
		$defaults->bg_color         = 'd43c67';
		$defaults->bg_hover_color   = '000000';
		$defaults->text_color       = 'ffffff';
		$defaults->text_hover_color = 'ffffff';
		$defaults->border           = 'none';
	}
	return $defaults;
}

LOL that was me with a brain fart and going cross eyed. Thanks for your code, but

$defaults->border = 'none';

is still not working for me. Any thoughts?

I’m going to read the Custom Module Developer Guide to see if I can figure out how to get all the defaults in the module. Thanks