<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "Dropdown", self:cfgvalue(section), self:choices(), {
+ "Dropdown", self:cfgvalue(section) or self.default, self:choices(), {
id = cbid,
name = cbid,
sort = self.keylist,
<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "DynamicList", self:cfgvalue(section), self:choices(), {
+ "DynamicList", self:cfgvalue(section) or self.default, self:choices(), {
name = cbid,
size = self.size,
sort = self.keylist,
<%+cbi/valueheader%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
- "Select", self:cfgvalue(section), self:choices(), {
+ "Select", self:cfgvalue(section) or self.default, self:choices(), {
id = cbid,
name = cbid,
size = self.size,
<%+cbi/valueheader%>
<textarea class="cbi-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") .. ifattr(self.readonly, "readonly") %>>
- <%-=pcdata(self:cfgvalue(section))-%>
+ <%-=pcdata(self:cfgvalue(section) or self.default)-%>
</textarea>
<%+cbi/valuefooter%>