The problem is that here, the class is overwritten and not added. In addition, I think it would be better set class to wrapper (from which you can easily get to the input).
|
$control->class = 'custom-file-input'; |
Solution: something like this
public function getControl(){
$control = parent::getControl();
BootstrapUtils::standardizeClass($control);
$wrapperClass = $control->class;
$wrapperClass[] = 'custom-file';
$control->class = 'custom-file-input';
$el = Html::el('div', ['class' => $wrapperClass]);
$el->addHtml($control);
$el->addHtml(
Html::el('label', [
'class' => ['custom-file-label'],
'for' => $this->getHtmlId(),
])->setText($this->buttonCaption)
);
return $el;
}
The problem is that here, the class is overwritten and not added. In addition, I think it would be better set class to wrapper (from which you can easily get to the input).
bootstrap-4-forms/src/Inputs/UploadInput.php
Line 59 in e072dba
Solution: something like this