I need help for selected option(option database and are data from the same table)
<option selected value="-1">Open this select menu</option>
@foreach($itens2 as $iten2)
<option class="form-control" value="{{$iten2->id}}"> {{$iten2->nome}}</option>
@endforeach
and depending on what I choose, those options fill in the data within the input
For example, I want to show the data and email in the input (email).
<div class="form-group">
<label>Email</label>
<input type="text" class="form-control" name="email" id="email" placeholder="Email" aria-label="Username" aria-describedby="basic-addon1">
</div>
What is the best way to overcome this?
Thanks!