![mark](http://olbhidnfa.bkt.clouddn.com/blog/20171014-233217316.png)
## 代码
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<form action="{:url('AdminCategory/addPost')}" method="post">
<div class="form-group">
<label for="input-parent"><span class="form-required">*</span>上级</label>
<div>
<select class="form-control" name="parent_id" id="input-parent">
<option value="0">作为一级分类</option>
{$categories_tree}
</select>
</div>
</div>
<div class="form-group">
<label for="input-name"><span class="form-required">*</span>分类名称</label>
<div>
<input type="text" class="form-control" id="input-name" name="name">
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">填加</button>
</div>
</form>
</body>
</html>
```