showing results for - "nodejs store selected dropdown in variable"
Helene
12 Feb 2018
1var selectedValue = user.schoolType;
2
3<select class="form-control" id="schoolType" name="schoolType" value="
4{{user.schoolType}}">
5
6  <option value="none" selected="{{user.schoolType === 
7this.value}}">None</option>
8<option value="public" selected="{{user.schoolType === 
9this.value}}">Public</option>
10<option value="private" selected="{{user.schoolType === 
11this.value}}">Private</option>
12<option value="homeSchool" selected="{{user.schoolType === 
13this.value}}">Home School</option>
14 </select>
15