Support the ongoing development of Laravel.io →
Requests Blade Forms
Last updated 1 year ago.
0

What do you mean by "doesn't do anything", does a request get sent to the server? Does the form not submit? Narrowing it down will make the issue easier to debug.

As an aside, you may wish to check out resource controllers as they are a much better approach to what you're trying to achieve, you won't need to manually configure nested resources like you are now for example.

Last updated 1 year ago.
0

By "doesn't do anything" I mean I don't get any response, modal windows is closed and that's it. No error or anything else. When I use the same code without modal it works.

So the only way I managed to get it working was through url projects/16/tasks/15/destroy which showed form (That is also showed in modal window) and when form is submitted it deletes the task. So I think the issue lies in TW bootstrap not in L4 :\

Last updated 1 year ago.
0

Then it looks like the problem is on the modal (jQuery)

You need to use event.preventDefault() on your modal's callback (javascript) for the modal to process the form before it closes the popup. Then, in the callback, you need to submit the delete form via javascript.

Last updated 1 year ago.
0

Ok, I tried with this one (added id=MyForm to form) and also doesn't submit.

~~~
$('#MyForm').submit(function(event) {
  
  event.preventDefault();
});
Last updated 1 year ago.
0

Hard to figure out with so little code to see.

http://plnkr.co/UDl26oXqtAZJ95K3GPvJ?p=info

Last updated 1 year ago.
0
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

RokSiEu roksieu Joined 31 Jan 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.