public function getTemplateByHandle($handle)
{
$templateRecord = FormBuilder2_TemplateRecord::model()->findByAttributes(array('handle' => $handle));
if ($templateRecord) {
return FormBuilder2_TemplateModel::populateModel($templateRecord);
} else {
throw new Exception(404, Craft::t('No template exists with the handle “{handle}”', array('id' => $handle)));
}
}