Unexpected behaviour of LuCI.form.Value

Here's the code snippet:

		o = s.option(form.Value, "dest_dns", _("Remote DNS"));
		o.value('wan');
		o.optional = false;
		o.datatype = "list(or(cidr,host,network,ipaddr))";

The value stored in the uci config is 1.1.1.1, however the WebUI also adds unspecified at the top as per screenshot. How can I have the unspecified removed from the drop-down?

PS. I've tried rmempty, it doesn't help.

Thanks!

@jow, could you please have a look at this? any suggestions?

.rmempty = false should change it into — Please choose —

1 Like