Backend\Modules\Faq\Actions\Edit::loadForm PHP Method

loadForm() private method

Load the form
private loadForm ( )
    private function loadForm()
    {
        // get values for the form
        $rbtHiddenValues[] = array('label' => BL::lbl('Hidden'), 'value' => 'Y');
        $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
        $categories = BackendFaqModel::getCategories();
        // create form
        $this->frm = new BackendForm('edit');
        $this->frm->addText('title', $this->record['question'], null, 'form-control title', 'form-control danger title');
        $this->frm->addEditor('answer', $this->record['answer']);
        $this->frm->addRadiobutton('hidden', $rbtHiddenValues, $this->record['hidden']);
        $this->frm->addDropdown('category_id', $categories, $this->record['category_id']);
        $this->frm->addText('tags', BackendTagsModel::getTags($this->URL->getModule(), $this->record['id']), null, 'form-control js-tags-input', 'form-control danger js-tags-input');
        $this->meta = new BackendMeta($this->frm, $this->record['meta_id'], 'title', true);
    }