Craft\AmFormsVariable::getForm PHP Method

getForm() public method

Get a form by its handle.
public getForm ( string $handle ) : AmForms_FormModel | null
$handle string
return AmForms_FormModel | null
    public function getForm($handle)
    {
        // Get the form
        $form = $this->getFormByHandle($handle);
        if (!$form) {
            craft()->amForms->handleError(Craft::t('No form exists with the handle “{handle}”.', array('handle' => $handle)));
            return false;
        }
        return $form;
    }