This commit is contained in:
kali
2024-03-18 18:24:24 +03:00
parent bd456e6331
commit 906a8fd739
3 changed files with 6 additions and 3 deletions

View File

@ -14,6 +14,7 @@ class ActiveForm
{
private BaseInput $fieldObject;
/**
* @param string $action
* @return void
@ -37,7 +38,7 @@ class ActiveForm
if ($class === Select::class){
$this->fieldObject = SelectBuilder::build($name, $params);
}
if ($class === TextArea::class){
elseif ($class === TextArea::class){
$this->fieldObject = TextAreaBuilder::build($name, $params);
}
else {

View File

@ -51,7 +51,7 @@ class Select extends BaseInput
if($this->hasLabel == true) {
$label = "<label>$this->labelTitle</label>";
}
$this->html = str_replace('{select}', $select, $this->selectTemplate->getSelectTemplate());
$this->html = str_replace('{input}', $select, $this->selectTemplate->getInputTemplate());
$this->html = str_replace('{label}', $label, $this->html);
return $this;
@ -90,6 +90,7 @@ class Select extends BaseInput
public function setOptions($options)
{
$this->options = array_merge($options, $this->options);
return $this;
}