htmlFactory->makeElement('input') ->addAttr('type', 'number' ) ->addAttr('name', $this->htmlName() ) ->addAttr('class', 'hc-field') // ->addAttr('class', 'hc-block') // ->addAttr('class', 'hc-full-width') ; if( strlen($this->value) ){ $out->addAttr('value', $this->value); } $attr = $this->getAttr(); foreach( $attr as $k => $v ){ $out->addAttr( $k, $v ); } $out->addAttr('id', $this->htmlId()); if( (null !== $this->label) && strlen($this->label) ){ $placeHolder = $this->label; $placeHolder = strip_tags( $placeHolder ); $out ->addAttr('placeholder', $placeHolder) ; } if( (null !== $this->label) && strlen($this->label) ){ $out = $this->htmlFactory->makeLabelled( $this->label, $out, $this->htmlId() ); } return $out; } }