private function loadForm()
{
// create form
$this->frm = new FrontendForm('search', null, 'get', null, false);
// could also have been submitted by our widget
if (!\SpoonFilter::getGetValue('q', null, '')) {
$_GET['q'] = \SpoonFilter::getGetValue('q_widget', null, '');
}
// create elements
$this->frm->addText('q', null, 255, 'inputText liveSuggest autoComplete', 'inputTextError liveSuggest autoComplete');
// since we know the term just here we should set the canonical url here
$canonicalUrl = SITE_URL . FrontendNavigation::getURLForBlock('Search');
if (isset($_GET['q']) && $_GET['q'] != '') {
$canonicalUrl .= '?q=' . \SpoonFilter::htmlspecialchars($_GET['q']);
}
$this->header->setCanonicalUrl($canonicalUrl);
}