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

loadForm() private method

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