everpress-co / mailster-block-forms

Create Mailster forms with the block editor
https://wordpress.org/plugins/mailster-block-forms/
3 stars 0 forks source link

Not all blocks are available #5

Closed emos321 closed 1 year ago

emos321 commented 1 year ago

Describe the bug

I would like to use blocks with GenerateBlock but they are not visible in the editor.

Steps to Reproduce

Explained in the pictures below

Screenshots, screen recording, code snippet

Block view when editing a post, page, cpt etc. + block settings that are available

Screenshot_15

Screenshot_1

Screenshot_6

View when editing Mailster Block form + block setting

Screenshot_2

Screenshot_8

Screenshot_3

Environment information

No response

WordPress information

WP 6.0.3

Code of Conduct

evrpress commented 1 year ago

Hi!

We currently only support most of the core blocks but there's a filter mailster_forms_allowed_block_types you can use:

add_filter(
    'mailster_forms_allowed_block_types',
    function( $blocks ) {

        $blocks[] = 'generateblocks/button-container';
        $blocks[] = 'generateblocks/button';

        return $blocks;
    }
);

Please understand that not all blocks work as expected (that's why we only support certain once in the first place)