Backend\Modules\FormBuilder\Actions\Edit::loadForm PHP Метод

loadForm() приватный Метод

Load the form
private loadForm ( )
    private function loadForm()
    {
        $this->frm = new BackendForm('edit');
        $this->frm->addText('name', $this->record['name']);
        $this->frm->addDropdown('method', array('database' => BL::getLabel('MethodDatabase'), 'database_email' => BL::getLabel('MethodDatabaseEmail')), $this->record['method']);
        $this->frm->addText('email', implode(',', (array) $this->record['email']));
        $this->frm->addText('identifier', $this->record['identifier']);
        $this->frm->addEditor('success_message', $this->record['success_message']);
        // textfield dialog
        $this->frm->addText('textbox_label');
        $this->frm->addText('textbox_value');
        $this->frm->addText('textbox_placeholder');
        $this->frm->addText('textbox_classname');
        $this->frm->addCheckbox('textbox_required');
        $this->frm->addCheckbox('textbox_reply_to');
        $this->frm->addText('textbox_required_error_message');
        $this->frm->addDropdown('textbox_validation', array('' => '', 'email' => BL::getLabel('Email'), 'numeric' => BL::getLabel('Numeric')));
        $this->frm->addText('textbox_validation_parameter');
        $this->frm->addText('textbox_error_message');
        // textarea dialog
        $this->frm->addText('textarea_label');
        $this->frm->addTextarea('textarea_value');
        $this->frm->getField('textarea_value')->setAttribute('cols', 30);
        $this->frm->addText('textarea_placeholder');
        $this->frm->addText('textarea_classname');
        $this->frm->addCheckbox('textarea_required');
        $this->frm->addText('textarea_required_error_message');
        $this->frm->addDropdown('textarea_validation', array('' => ''));
        $this->frm->addText('textarea_validation_parameter');
        $this->frm->addText('textarea_error_message');
        // datetime dialog
        $this->frm->addText('datetime_label');
        $this->frm->addDropdown('datetime_value_amount', array('' => '', '1' => '+1', '2' => '+2', '3' => '+3', '4' => '+4', '5' => '+5'));
        $this->frm->addDropdown('datetime_value_type', array('' => '', 'today' => BL::getLabel('Today'), 'day' => BL::getLabel('Day'), 'week' => BL::getLabel('Week'), 'month' => BL::getLabel('Month'), 'year' => BL::getLabel('Year')));
        $this->frm->addDropdown('datetime_type', array('date' => BL::getLabel('Date'), 'time' => BL::getLabel('Time')));
        $this->frm->addCheckbox('datetime_required');
        $this->frm->addText('datetime_required_error_message');
        $this->frm->addDropdown('datetime_type', array('date' => BL::getLabel('Date'), 'time' => BL::getLabel('Time')));
        $this->frm->addDropdown('datetime_validation', array('' => '', 'time' => BL::getLabel('Time')));
        $this->frm->addText('datetime_classname');
        $this->frm->addText('datetime_error_message');
        // dropdown dialog
        $this->frm->addText('dropdown_label');
        $this->frm->addText('dropdown_values');
        $this->frm->addDropdown('dropdown_default_value', array('' => ''))->setAttribute('rel', 'dropDownValues');
        $this->frm->addCheckbox('dropdown_required');
        $this->frm->addText('dropdown_required_error_message');
        $this->frm->addText('dropdown_classname');
        // radiobutton dialog
        $this->frm->addText('radiobutton_label');
        $this->frm->addText('radiobutton_values');
        $this->frm->addDropdown('radiobutton_default_value', array('' => ''))->setAttribute('rel', 'radioButtonValues');
        $this->frm->addCheckbox('radiobutton_required');
        $this->frm->addText('radiobutton_required_error_message');
        $this->frm->addText('radiobutton_classname');
        // checkbox dialog
        $this->frm->addText('checkbox_label');
        $this->frm->addText('checkbox_values');
        $this->frm->addDropdown('checkbox_default_value', array('' => ''))->setAttribute('rel', 'checkBoxValues');
        $this->frm->addCheckbox('checkbox_required');
        $this->frm->addText('checkbox_required_error_message');
        $this->frm->addText('checkbox_classname');
        // heading dialog
        $this->frm->addText('heading');
        // paragraph dialog
        $this->frm->addEditor('paragraph');
        $this->frm->getField('paragraph')->setAttribute('cols', 30);
        // submit dialog
        $this->frm->addText('submit');
    }