private function fixInputAttributes(&$field)
    {
        if (is_array($field['attributes'])) {
            $field['attributes']['placeholder'] = $field['placeholder'];
        } else {
            $field['attributes'] .= sprintf(' placeholder="%s"', $field['placeholder']);
            $field['attributes'] = trim($field['attributes']);
        }
    }
private function fixInputAttributes(&$field)
    {
        if (is_array($field['attributes'])) {
            $field['attributes']['placeholder'] = $field['placeholder'];
        } else {
            $field['attributes'] .= sprintf(' placeholder="%s"', $field['placeholder']);
            $field['attributes'] = trim($field['attributes']);
        }
    }
private function fixInputAttributes ( & $ field ) { if ( is_array ( $ field [ 'attributes' ] ) ) { $ field [ 'attributes' ] [ 'placeholder' ] = $ field [ 'placeholder' ] ; } else { $ field [ 'attributes' ] .= sprintf ( ' placeholder="%s"' , $ field [ 'placeholder' ] ) ; $ field [ 'attributes' ] = trim ( $ field [ 'attributes' ] ) ; } }
Adds the placeholder to the attributes with string or array detection of attributes

@param array $field All the fields for the input creation
Adds the placeholder to the attributes with string or array detection of attributes