Adding External Form to my template

Permalink
Hi,
I have managed to create an external form using the method:http://www.concrete5.org/community/forums/usage/external-form-email... The form worked when I embedded the block via cms. However, I need to put the form into my template. the following code did not work.

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


It it probably because my external form did not have a block name. But how could I set its name?