Hard Coding Form Block Into Layout Question

Permalink
I'm trying to hard code a form block into one of my layouts. I created the block the regular way, add it to my scrapbook, named the block sidebar_case_form and then embedded the block by using this code:

$b = Block::getByName(sidebar_case_form');
$b->display();

The form now shows up in the layout but it only refreshes the page when I submit the form. No emails arrive and nothing shows up in reports. Am I missing something?

pixo
 
12345j replied on at Permalink Reply
12345j
I believe this is because the block id (bId) is required to get the results for that form only- so you can't hard code it that way, only using page defaults.
pixo replied on at Permalink Reply
pixo
Thanks. I'll give that a try.