0

here is my form i want to post text fields and image both in one ajax call

<form class="form-horizontal" role="form">
 <input type="text" class="form-control" id="id_edit" disabled>
 <input type="text" class="form-control" id="name_edit">
 <input type="text" class="form-control" id="job_edit">
 <input type="text" class="form-control" id="email_edit">
 <input type="text" class="form-control" id="contact_edit">
 <input type="file" class="form-control" id="profile_edit">
</form>

here is my ajax script

$.ajax({
    type: 'PUT',
    url: 'team/' + id,
    data: {
    '_token': $("#token").val(),
    'id': $("#id_edit").val(),
    'name': $('#name_edit').val(),
    'job_title': $('#job_edit').val(),
    'email': $('#email_edit').val(),
    'contact': $('#contact_edit').val(),
    'profile': $('#profile_edit').val()
 }
DiskJunky
  • 4,750
  • 3
  • 37
  • 66

0 Answers0