I created a table for editing Movie Object. one of this table's column is a form that popup with modal class (bootstrap class):) this is my code:
<div class="modal-body">
<form method="post" action="">
<input type="hidden" name="_token" value="">
<div class="form-group">
<label for="movie-name" class="col-form-label">Name:</label>
<input type="text" class="form-control" name="movie_name" id="movie-name" placeholder="">
</div>
<div class="form-group">
<label for="movie-director" class="col-form-label">Direcor:</label>
<select class="form-control" name="Director">
@foreach($directors as $director)
<option value=""></option>
@endforeach
</select>
</div>
<button class="form-control btn btn-success" type="submit" class="btn btn-primary">Send message</button>
</form></div>
but when I choose one of edit button,always value of the first item (movie) pass to my controller :( I've test my code and find out it's happen because I used modal class. do you have any idea to solve this problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire