Closed dumithsalinda closed 3 years ago
Hi, yes that is possible by creating a controller file for the block.
Like in this example by creating the file themes\your-theme\blocks\example-block\controller.php
:
<?php
namespace Themes\YourTheme\Blocks\ExampleBlock;
use PHPageBuilder\Modules\GrapesJS\Block\BaseController;
class Controller extends BaseController
{
/**
* Handle the current request.
*/
public function handleRequest()
{
// handle form submit
}
}
Hi, Is there a way to handle the form submission features within the block it self. Send a mail or the add to database etc.
Thank you