3

I'm trying to build simple login form using following code:

{!! Form::open(['class'=>'login-form', 'method'=>'post', 'action'=>'AdminUserController@store']) !!}
    <h3 class="form-title">Sign In</h3>
    <div class="alert alert-danger display-hide">
        <button class="close" data-close="alert"></button>
                    <span>
        Enter your email and password. </span>
    </div>
    <div class="form-group">
        <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
        {!! Form::label('email', 'Email ID', array('class' => 'control-label visible-ie8 visible-ie9')) !!}
        {!! Form::text(['class'=>'form-control form-control-solid placeholder-no-fix','type'=>'email', 'autocomplete'=>'off', 'placeholder'=>'Email ID','name'=>'email']) !!}
    </div>
    .
    .
    .
    .
{!! Form::close() !!}

and I'm getting following error:

enter image description here

Please help

Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148

1 Answers1

2

Your arguments for Form::text() are wrong.

Instead of

Form::text(['class'=>'form-control form-control-solid placeholder-no-fix','type'=>'email', 'autocomplete'=>'off', 'placeholder'=>'Email ID','name'=>'email'])

You should have

Form::email('email', null, ['class'=>'form-control form-control-solid placeholder-no-fix', 'autocomplete'=>'off', 'placeholder'=>'Email ID'])

As per the docs.

Josh
  • 1,794
  • 3
  • 17
  • 31