我想用複選框刪除記錄並且沒有複選框,我認爲表單是錯誤的,但我不知道我必須做些什麼來區分表單。
請幫我解決這個問題。區別表單動作
這裏是我的代碼:
<form method="post" action="{{ URL::to('admin/seleksi/delete')}}" >
{{ csrf_field() }}
<input type="hidden" name="_method" value="delete">
<table border="0" class="table table-striped" id="print">
<thead>
<tr>
<td width="10">No</td>
<td width="100">Nama</td>
<td width="10"></td>
<td width="10"></td>
<td width="10"></td>
</tr>
</thead>
@foreach($pelamar as $p)
<tr>
<td>{{ $i++ }}</td>
<td>{{ $p->Nama }}</td>
<td>
<a class="btn btn-xs btn-xs btn-primary" title="View CV" href="{{URL::to('admin/seleksi/cv/'. $p->id)}}"><i class="glyphicon glyphicon-list-alt"></i></a>
</td>
<td>
<form method="post" action="{{ URL::to('admin/lowongan/seleksi/delete/' . $p->pelamarid) }}" >
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('DELETE') }}
<button title="Delete Pelamar" type="submit" class="delete-modal btn btn-danger btn-xs" title="Hapus Pengumuman"><i class=" glyphicon glyphicon-trash" ></i></button>
</form>
</td>
<td>
<input type="checkbox" name="categories[]" class="checkboxes" value="{{ $p->pelamarid }}" />
</td>
</tr>
@endforeach
</table></div>
<div class="col-xs-12 col-sm-12 col-md-12"><!--header start-->
<div class="row">
<button class="btn btn-danger" type="submit">Delete Checked</button>
<div align="center" class="col-xs-12 col-sm-12 col-md-12" style=""><!--header start-->
<br>
<a href="{{ URL::to('admin/pengumuman/create/'. $cruds->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-bullhorn"></i> Umumkan Hasil Lowongan Ini</a>
<a href="{{ URL::to('admin/lowongan/' . $cruds->id . '/view') }}" class="btn btn-success"><i class="glyphicon glyphicon-download"></i> Download List Seleksi</a>
</div>
</div>
</div>
</form>
你不能在窗體中有窗體,你需要分開這些窗體。 – Jerodev