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

your Formdata must be an <input> tag, and have a name="fName"

Last updated 1 year ago.
0

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?

Last updated 1 year ago.
0

Anyone have some more examples maybe?

Last updated 1 year ago.
0

still struggling with this peeps :(

Last updated 1 year ago.
0

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...

  • You’ve got processData: false set in the AJAX request, is this effecting the data?
  • If you take away all the JavaScript, does it work?
  • Not sure what FormData() is or how it works, so that could be doing something unexpected?
  • In your Controller, you have a few instances of $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.

Last updated 1 year ago.
0

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 :)

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.