your Formdata
must be an <input>
tag, and have a name="fName"
Thanks for your reply, but I'm not 100% I'm following you.
This is the code for my form
<form action="#" method="POST" id="reportForm"> <input type="hidden" class="form-control" name="id" id="id"> <input type="text" class="form-control" name="fName" id="fName"> <input type="text" class="form-control" name="status" id="status"> <button type="submit" class="btn btn-lg btn-success "><span class="glyphicon glyphicon-floppy-disk"></span> Save</button> </form>Are saying I need to add an addition input type in there?
There’s a lot going on here so it’s hard to follow – I’d try breaking it down bit by bit until it works. Few observations...
processData: false
set in the AJAX request, is this effecting the data?FormData()
is or how it works, so that could be doing something unexpected?$report -> heading = Input::get('fName');
which I’m not sure will work as it shouldn’t have spaces when chaining, so it should be $report->heading
, so it’s possible that your page is just getting a 500 and not returning anything.Hope that gets you started.
Amazing thanks for pointing me in the right direction. I followed instructions from here (http://hayageek.com/jquery-ajax-form-submit/) and it seems to be working great now :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community