2017-06-01 09:44:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Krutush\Form;
|
|
|
|
|
|
|
|
class TextArea extends Element{
|
2018-04-25 17:15:57 +00:00
|
|
|
public function valid($data)/*: bool|string*/{
|
2017-06-01 09:44:36 +00:00
|
|
|
return parent::valid($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function html(string $more = '') : string{
|
2018-04-28 14:19:06 +00:00
|
|
|
return $this->htmlLabel().
|
|
|
|
'<textarea name="'.$this->data['name'].'" '.
|
|
|
|
'id="'.$this->getId().'" '.
|
2017-06-01 09:44:36 +00:00
|
|
|
(isset($this->data['required']) && $this->data['required'] == true ? 'required ' : '').
|
2018-05-07 12:11:15 +00:00
|
|
|
$more.'>'.(isset($this->data['value']) ? $this->data['value'] : '').'</textarea>';
|
2017-06-01 09:44:36 +00:00
|
|
|
}
|
|
|
|
}
|