private function validateForm()
{
// is the form submitted
if ($this->frm->isSubmitted()) {
// cleanup the submitted fields, ignore fields that were added by hackers
$this->frm->cleanupFields();
// validate required fields
$this->frm->getField('q')->isFilled(FL::err('TermIsRequired'));
// no errors?
if ($this->frm->isCorrect()) {
// get search term
$this->term = $this->frm->getField('q')->getValue();
}
}
}