getNameOnForm(); if ( $this->getOption( 'maxLength', false ) ) { $this->addHtmlAttr( 'maxlength', intval( $this->getOption( 'maxLength' ) ) ); } if ( $this->getOption( 'placeholder', false ) ) { $this->addHtmlAttr( 'placeholder', $this->getOption( 'placeholder' ) ); } $this->addCssClass( 'form-control' ); $this->addHtmlAttr( 'type', 'text' ); // $this->addHtmlAttr('id', $name_on_form); $this->addCssClass( str_replace( '_', '-', $name_on_form ) ); $this->addHtmlAttr( 'name', $name_on_form . '[]' ); } /** * Shows the html markup of the control. * * @since 1.0.0 * @return void */ public function html() { $values = $this->getValue(); if ( ! empty( $values ) ) { $values = explode( '{%spr%}', $values ); } else { $values = []; } ?>