submit button with confirmation


I have a send button

{!! Form::submit('Registrar',['class' => 'btn btn-primary'] ) !!}

works fine, but I would like to see if there is any quick option of confirmation question. example

onclick="return confirm('¿Estas Seguro?')"

I have tried to read the documentation of laravel and laravel collective. but I can not solve it. Does anyone know?

asked by Luis Cárdenas 16.08.2016 в 01:10

1 answer


No, there is no such thing in Laravel or LaravelCollective's FormBuilder.

The simplest thing could perhaps be to add the code you show to the Form, with the event onsubmit :

{!! Form::open(['method' => 'DELETE', 'onsubmit' => 'return confirm("¿Estas Seguro?")']) !!}
answered by 16.08.2016 / 01:29