Manmeet S. Oberoi
Manmeet S. Oberoi

Reputation: 1122

Styling a button in the Form::submit

In the standard method a submit button in my form is as

<button class="btn waves-effect waves-light center signup_btn" type="submit">
    Submit
    <i class="mdi-content-send right"></i>
</button>

I am using materialize.css Now how can i achieve the same UI using the FormBuilder of the Illuminate\Html package

{!! Form::submit('Submit',['class' => 'btn waves-effect waves-light center signup_btn' ]) !!}

But this does not render the button correctly. The "waves-effect" class causes the rest of the classes be applied to <i> tag. How to fix this ?

Upvotes: 2

Views: 1419

Answers (1)

Manmeet S. Oberoi
Manmeet S. Oberoi

Reputation: 1122

So someone helped me over the gitter forum...

Though this might not be the correct way solution, but this definitely solves the problem.

{!! Form::button('<span class="mdi-content-send right"></span> Submit', array('class'=>'btn waves-effect waves-light center signup_btn', 'type'=>'submit')) !!}

Some padding needs to be applied to the span, so that submit and the icon are a bit apart.

Upvotes: 1

Related Questions