I have a select statement with a large number of options to select. I am retrieving all of the options from my back-end and filling them in. However I would also like to select an option, which I also pass in from my backend. My code is as follows:
@for($i=0; $i<sizeof($info['userInfo']['courses']); $i++) //
<tr class="table_row">
<td><select class="form-control" name="TB1_instructions_course[]" id="course" required="" value='{{$info['userInfo']['courses'][$i]}}'>
<option value="">Course</option>
@foreach($info['staticInfo']['courses'] as $course) //pull in static data
<option>{{$course['course']}}</option>
@endforeach
</select></td>
<td><input type="text" class="form-control" placeholder="C01" name="TB1_instructions_section[]" id='section' required="" value='{{$info['userInfo']['courses'][$i]}}'></td>
<!-- the rest of the table-->
Now the text field works perfectly and populates it accordingly, but I am unable to select the appropriate option in my select input. Any help? Can I do this without using jQuery or javascript?