Support the ongoing development of Laravel.io →
posted 10 years ago
Forms
Last updated 1 year ago.
0

HTML5 specification states that <form> should have no <form> element descendants. Therefore you should avoid having nested forms.

I personally have the delete button as a basic button and fire the action via javascript.

    echo Form::button('Delete', array('class' => 'btn btn-danger delete-btn', 'data-recordid' => $invoice->id));
    $('.delete-btn').on('click', function(){
        var recordID = $(this).data('recordid');
        var ajax = $.ajax({
            url: "/invoice/" + recordID + '/delete' ,
            type: "DELETE"
        })
    });

Or something like that :)

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Lobomau lobomau Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.