Я хочу удалить определенные поля из «Добавить входные данные», я имею в виду, я хочу удалить только кнопку «Добавить входные данные» из покрытия и текста, я нашел .php-файл, который, как мне кажется, контролирует эти строки кода, но я пыталсязакодировать некоторые вещи, и это не сработало, я выясняю, как ограничить эту инструкцию, если кто-нибудь может мне помочь, пожалуйста
Следующий код находится в application / views / helpers / ElementForm
/// оригинальный код
// Фильтрация компонентов отображения формы элемента $labelComponent = $this->_getLabelComponent();
$inputsComponent = $this->_getInputsComponent($extraFieldCount);
$descriptionComponent = $this->_getDescriptionComponent();
$commentComponent = $this->_getCommentComponent();
$addInputComponent = $this->view->formButton('add_element_' . $this->_element['id'],
__('Add Input'), array('class' => 'add-element'));
$components = array(
'label' => $labelComponent,
'inputs' => $inputsComponent,
'description' => $descriptionComponent,
'comment' => $commentComponent,
'add_input' => $addInputComponent,
'html' => null
);
///// код, который я добавляю
// Фильтрациякомпоненты отображения формы элемента $labelComponent = $this->_getLabelComponent();
if ( $labelComponent = 'coverage'){
$inputsComponent = 0 }
else{
$inputsComponent = $this->_getInputsComponent($extraFieldCount);}
$descriptionComponent = $this->_getDescriptionComponent();
$commentComponent = $this->_getCommentComponent();
$addInputComponent = $this->view->formButton('add_element_' . $this->_element['id'],
__('Add Input'), array('class' => 'add-element'));
$components = array(
'label' => $labelComponent,
'inputs' => $inputsComponent,
'description' => $descriptionComponent,
'comment' => $commentComponent,
'add_input' => $addInputComponent,
'html' => null
);
Я еще не исправил это, я не знаю, нужно ли мне модифицировать функцию из глобальных переменных, которые определяют этот «элемент» или что-то подобное