Search code examples
formslaraveldisabled-input

Laravel: form looks like it's disabled


I'm new to Laravel, and I'm trying to create a form. However, I can't use in the browser, and it looks like it's disabled. Who can tell me why?

enter image description here

My css

.container {
    width: 100%;
    display: flex;
}

/* FORM */
.form_block {
    margin-top: 30px;
}

My welcome.blade.php part:

<section id="s2">
    <div class="container">
        {{ Form::open(array('class' => 'form_block')) }}
            {{ Form::text('email', 'example@gmail.com') }}
            {{ Form::submit('Send Email!') }}
        {{ Form::close() }}
    </div>
</section>

Solution

  • Try with:

    <section id="s2">
        <div class="container">
            {{ Form::open(array('class' => 'form_block', route => 'route.name')) }}
                 {{ Form::input('email', 'email_field_name') }}
                {{ Form::submit('Send Email!') }}
            {{ Form::close() }}
        </div>
    </section>
    

    Remember to add a route to handle form submit action!