1. Christoffer Niska
  2. yii-bootstrap
  3. Issues
Issue #275 new

TbInput hint class cannot be configured

John Fragoulis
created an issue

I am in a situation where I have an horizontal form and what I need is to display a small help link next to some fields, which I need to render inline and right next to the text/select input.

I tried using the hint htmlOption only to realize that it cannot be configured to use the help-inline class. It is hardcoded to use the help-block class.

I propose the following change to TnInput::getHint():

if (isset($htmlOptions['class']))
  $htmlOptions['class'] .= ' help-block';
  $htmlOptions['class'] = 'help-block';

to become

if (!isset($htmlOptions['class']))
  $htmlOptions['class'] = 'help-block';


$htmlOptions = $this->hintOptions;
if(isset($htmlOptions['inline']) {
} else {

if (isset($htmlOptions['class']))
  $htmlOptions['class'] .= ' ' . $class;
  $htmlOptions['class'] = $class;

Comments (0)

  1. Log in to comment