Merge pull request #16 from alllinux/v1.0.1

Add placeholder attribute to search form
This commit is contained in:
Stephan Kasdorf
2024-03-12 10:36:43 +01:00
committed by GitHub

View File

@@ -13,7 +13,8 @@ class TypeSearch extends FormAttributes implements IForm
{ {
private $_attributes = array( private $_attributes = array(
self::FORM_ATTRIBUTE_CLASS => '', self::FORM_ATTRIBUTE_CLASS => '',
self::FORM_ATTRIBUTE_ID => '' self::FORM_ATTRIBUTE_ID => '',
self::FORM_ATTRIBUTE_PLACEHOLDER => ''
); );
public function loadElement( $attributes ) public function loadElement( $attributes )
@@ -29,7 +30,7 @@ class TypeSearch extends FormAttributes implements IForm
*/ */
private function _setElement( ) private function _setElement( )
{ {
$this->_element = '<input type="search" ID CLASS>' . "\n"; $this->_element = '<input type="search" placeholder="PLACEHOLDER" ID CLASS>' . "\n";
} }