public function file($name, $label = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $options = array_merge(['class' => 'filestyle', 'data-buttonBefore' => 'true'], $options);

        $options = $this->getFieldOptions($options, $name);
        $inputElement = $this->form->input('file', $name, null, $options);

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $options) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
public function file($name, $label = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $options = array_merge(['class' => 'filestyle', 'data-buttonBefore' => 'true'], $options);

        $options = $this->getFieldOptions($options, $name);
        $inputElement = $this->form->input('file', $name, null, $options);

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $options) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
public function file ( $ name , $ label = null , array $ options = [ ] ) { $ label = $ this -> getLabelTitle ( $ label , $ name ) ; $ options = array_merge ( [ 'class' => 'filestyle' , 'data-buttonBefore' => 'true' ] , $ options ) ; $ options = $ this -> getFieldOptions ( $ options , $ name ) ; $ inputElement = $ this -> form -> input ( 'file' , $ name , null , $ options ) ; $ wrapperOptions = $ this -> isHorizontal ( ) ? [ 'class' => $ this -> getRightColumnClass ( ) ] : [ ] ; $ wrapperElement = '<div' . $ this -> html -> attributes ( $ wrapperOptions ) . '>' . $ inputElement . $ this -> getFieldError ( $ name ) . $ this -> getHelpText ( $ name , $ options ) . '</div>' ; return $ this -> getFormGroup ( $ name , $ label , $ wrapperElement ) ; }
Create a Boostrap file upload button.

@param  string  $name
@param  string  $label
@param  array   $options
@return string
Create a Boostrap file upload button .