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.
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 :\
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.
Ok, I tried with this one (added id=MyForm to form) and also doesn't submit.
~~~
$('#MyForm').submit(function(event) {
event.preventDefault();
});
Hard to figure out with so little code to see.
Updated with my JS code.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community