/**
  * @inheritdoc
  */
 public function field($title, $name, $control = '', $errors = null, $help = '')
 {
     $template = '
     <div class="form-group %s">
         %s
         %s
         %s
         %s
       </div>
     ';
     $formClass = !empty($errors) && $errors->has($name) ? 'has-error' : '';
     $label = !is_null($title) ? $this->builder->label($name, $title) : '';
     $error = empty($errors) ? '' : $errors->first($name, '<p class="help-block">:message</p>');
     $help = empty($help) ? '' : '<p class="help-block">' . $help . '</p>';
     return sprintf($template, $formClass, $label, $control, $error, $help);
 }
 /**
  * @inheritdoc
  */
 public function field($title, $name, $control = '', $errors = null, $help = '')
 {
     $template = '
         <div class="form-group %s">
           %s
           <div class="%s">
             %s
             %s
             %s
           </div>
         </div>
     ';
     $formClass = !empty($errors) && $errors->has($name) ? 'has-error' : '';
     $labelClass = "col-md-{$this->labelWidth} control-label";
     if (!is_null($title)) {
         $label = $this->builder->label($name, $title, ['class' => $labelClass]);
     } else {
         $label = '<div class="' . $labelClass . '"></div>';
     }
     $controlClass = "col-md-{$this->controlWidth}";
     $error = empty($errors) ? '' : $errors->first($name, '<p class="help-block">:message</p>');
     $help = empty($help) ? '' : '<p class="help-block">' . $help . '</p>';
     return sprintf($template, $formClass, $label, $controlClass, $control, $error, $help);
 }
 /**
  * Checks if macro is registered.
  *
  * @param string $name
  * @return bool 
  * @static 
  */
 public static function hasMacro($name)
 {
     //Method inherited from \Collective\Html\FormBuilder
     return \Rutorika\Html\FormBuilder::hasMacro($name);
 }