Hello @frzsombor,
Thanks for sharing the details. I have discussed this with our developers and I would like to inform you that this is planned for the future update and our team will add the compatibility in the upcoming updates.
Thank you
Hi there,
Our development team has reviewed this, and the current implementation is intentional. We are aware that apiVersion3 is not yet supported for the Fluent Forms block.
The primary reason is that apiVersion3 enforces loading the block within an iframe in the editor. This iframe environment unfortunately prevents the block from loading all the necessary CSS that Fluent Forms relies on for styling.
As you rightly observed, this results in layout and styling issues. To ensure the form preview displays correctly and functionally within the editor, we’ve had to stick with the current API version for now.
While it’s not a bug, we understand this affects workflows that depend on the iframe mode, and we appreciate you bringing it to our attention. We are tracking this for future updates as the Block Editor and our integration evolve.
Thank you
Hi @amimulihsanmahdi,
Thanks for the update!
I honestly think that this can be solved with the current Block Editor API without waiting for any updates of it. There are so many other plugins that provide custom blocks and they are able to load all the related and necessary custom CSS properly – the API is complete.
Also, I do think the current implementation has bugs, because when someone switches the “View” in Block Editor from “Desktop” to “Tablet” or “Mobile”, the blocks are forced to load in iframe and Fluent Forms blocks will break (because they will be forced to behave as v3 blocks).
I checked the source code and noticed that in app/Hooks/actions.php you’re using the enqueue_block_editor_assets hook, which is why the styles aren’t loading in the iframe. You might want to look into enqueue_block_assets and the difference between the two. I replaced the former with the latter, and now it works with API v3, the styles load correctly inside the iframe. A few other small tweaks might still be needed, such as adding the wp-block class to flueform-guten-wrapper, but full compatibility looks achievable.
Hope these help!