<div class="form-group"> <label class="col-sm-3 control-label is-required">套餐类型:</label> <div class="col-sm-8"> <select data-placeholder="请选择套餐类型" name="comboTypeId" class="form-control" required> <option value="" >请选择</option> <option th:each="comboType:${comboTypeList}" th:value="${comboType.id}" th:text="${comboType.comboName}"></option> </select> </div> </div>
数据回显
<div class="form-group"> <label class="col-sm-3 control-label is-required">套餐类型:</label> <div class="col-sm-8"> <select name="comboTypeId" data-placeholder="请选择套餐类型" class="form-control" required> <option th:each="comboType : ${comboTypeList}" th:text="${comboType.comboName}" th:value="${comboType.id}" th:selected="${comboType.id} eq ${baseClientInfo.comboTypeId}"></option> </select> </div> </div>