customControlGroup() public static method

Generates a custom (pre-rendered) form control group.
public static customControlGroup ( string $input, string $name, array $htmlOptions = [] ) : string
$input string the rendered input.
$name string the input name.
$htmlOptions array additional HTML attributes.
return string the generated control group.
Example #1
0
 public function testCustomControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::customControlGroup('<div class="widget"></div>', 'custom', array('label' => false));
     $group = $I->createNode($html, 'div.control-group');
     $controls = $group->filter('div.controls');
     $I->seeNodeChildren($controls, array('div.widget'));
 }
Example #2
0
      
      
   
        $input = $this->widget(
            'yiiwheels.widgets.maskinput.WhMaskInput', array(
            'mask' => '9999999999',
            'name'=>'rangohasta[]',
                'id'=>rand(), 
            'htmlOptions'=>array('class'=>'input-small'), 
            ), true
    );
    
      echo TbHtml::customControlGroup($input, 'rangohasta[]',
              array(
              'label'=>TbHtml::labelTb('Hasta', array('color' => TbHtml::LABEL_COLOR_IMPORTANT,'style'=>'padding:5px;')), 
              'color' => TbHtml::INPUT_COLOR_ERROR, 
          
              )
              );
  
    
//      
//     
//      echo TbHtml::textField('rangodesde', '', array(
//    'span'=>'2',
//    'color' => TbHtml::INPUT_COLOR_SUCCESS,
//    'prepend' => 'Desde',
//          'input'=>$input,
//    
//     ) ); 
//