I want to get the old selected value of Select after submit the form with the same Select. I tried doing this code below but it doesn't work old helper every time back me to the first item of Select, please any suggestion to fix this?
<form action="/plaintes/trib" method="POST">
@csrf
<label for="choose_trib"> choose : </label>
<select name="choose_trib" id="choose_trib" onchange="this.form.submit()">
<option value="-1" > choose your trib</option>
@foreach ($tribs as $trib)
<option value="" > </option>
@endforeach
</select>
</form>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire