src/Services/FormMaker.php
public function formContentBuild($field, $column, $input, $errorMessage)
    {
        $labelColumn = $labelCheckableColumn = '';
        $singleLineCheckType = false;
        $formLabelClass = config('form-maker.form.label-class', 'control-label');

        if (config('form-maker.form.orientation') == 'horizontal') {
            $labelColumn = config('form-maker.form.label-column');
            $labelCheckableColumn = config('form-maker.form.checkbox-column');
            $singleLineCheckType = true;
        }

        $name = ucfirst($this->inputCalibrator->getName($column, $field));

        $formBuild = '<label class="'.trim($formLabelClass.' '.$labelColumn).'" for="'.$name.'">';
        $formBuild .= $this->inputCalibrator->cleanString($this->columnLabel($field, $column));
        $formBuild .= '</label>'.$input.$this->errorMessage($errorMessage);

        if (isset($field['type'])) {
            if (in_array($field['type'], ['radio', 'checkbox'])) {
                $formBuild = '<div class="'.$field['type'].'">';
                if ($singleLineCheckType) {
                    $formBuild .= '<div class="'.$labelCheckableColumn.'">';
                }
                $formBuild .= '<label for="'.ucfirst($column).'" class="'.$formLabelClass.'">'.$input;
                $formBuild .= $this->inputCalibrator->cleanString($this->columnLabel($field, $column));
                $formBuild .= '</label>'.$this->errorMessage($errorMessage).'</div>';
                if ($singleLineCheckType) {
                    $formBuild .= '</div>';
                }
            } elseif (stristr($field['type'], 'hidden')) {
                $formBuild = $input;
            }
        }

        return $formBuild;
    }
public function formContentBuild($field, $column, $input, $errorMessage)
    {
        $labelColumn = $labelCheckableColumn = '';
        $singleLineCheckType = false;
        $formLabelClass = config('form-maker.form.label-class', 'control-label');

        if (config('form-maker.form.orientation') == 'horizontal') {
            $labelColumn = config('form-maker.form.label-column');
            $labelCheckableColumn = config('form-maker.form.checkbox-column');
            $singleLineCheckType = true;
        }

        $name = ucfirst($this->inputCalibrator->getName($column, $field));

        $formBuild = '<label class="'.trim($formLabelClass.' '.$labelColumn).'" for="'.$name.'">';
        $formBuild .= $this->inputCalibrator->cleanString($this->columnLabel($field, $column));
        $formBuild .= '</label>'.$input.$this->errorMessage($errorMessage);

        if (isset($field['type'])) {
            if (in_array($field['type'], ['radio', 'checkbox'])) {
                $formBuild = '<div class="'.$field['type'].'">';
                if ($singleLineCheckType) {
                    $formBuild .= '<div class="'.$labelCheckableColumn.'">';
                }
                $formBuild .= '<label for="'.ucfirst($column).'" class="'.$formLabelClass.'">'.$input;
                $formBuild .= $this->inputCalibrator->cleanString($this->columnLabel($field, $column));
                $formBuild .= '</label>'.$this->errorMessage($errorMessage).'</div>';
                if ($singleLineCheckType) {
                    $formBuild .= '</div>';
                }
            } elseif (stristr($field['type'], 'hidden')) {
                $formBuild = $input;
            }
        }

        return $formBuild;
    }
public function formContentBuild ( $ field , $ column , $ input , $ errorMessage ) { $ labelColumn = $ labelCheckableColumn = '' ; $ singleLineCheckType = false ; $ formLabelClass = config ( 'form-maker.form.label-class' , 'control-label' ) ; if ( config ( 'form-maker.form.orientation' ) == 'horizontal' ) { $ labelColumn = config ( 'form-maker.form.label-column' ) ; $ labelCheckableColumn = config ( 'form-maker.form.checkbox-column' ) ; $ singleLineCheckType = true ; } $ name = ucfirst ( $ this -> inputCalibrator -> getName ( $ column , $ field ) ) ; $ formBuild = '<label class="' . trim ( $ formLabelClass . ' ' . $ labelColumn ) . '" for="' . $ name . '">' ; $ formBuild .= $ this -> inputCalibrator -> cleanString ( $ this -> columnLabel ( $ field , $ column ) ) ; $ formBuild .= '</label>' . $ input . $ this -> errorMessage ( $ errorMessage ) ; if ( isset ( $ field [ 'type' ] ) ) { if ( in_array ( $ field [ 'type' ] , [ 'radio' , 'checkbox' ] ) ) { $ formBuild = '<div class="' . $ field [ 'type' ] . '">' ; if ( $ singleLineCheckType ) { $ formBuild .= '<div class="' . $ labelCheckableColumn . '">' ; } $ formBuild .= '<label for="' . ucfirst ( $ column ) . '" class="' . $ formLabelClass . '">' . $ input ; $ formBuild .= $ this -> inputCalibrator -> cleanString ( $ this -> columnLabel ( $ field , $ column ) ) ; $ formBuild .= '</label>' . $ this -> errorMessage ( $ errorMessage ) . '</div>' ; if ( $ singleLineCheckType ) { $ formBuild .= '</div>' ; } } elseif ( stristr ( $ field [ 'type' ] , 'hidden' ) ) { $ formBuild = $ input ; } } return $ formBuild ; }
Form Content Builder.

@param array  $field        Array of field values
@param string $column       Column name
@param string $input        Input string
@param string $errorMessage

@return string
Form Content Builder .