Example
'use strict';
'require form';
let m, s, o;
m = new form.Map('example', _('Example form'),
_('This is an example form mapping the contents of /etc/config/example'));
s = m.section(form.NamedSection, 'first_section', 'example', _('The first section'),
_('This sections maps "config example first_section" of /etc/config/example'));
o = s.option(form.Flag, 'some_bool', _('A checkbox option'));
o = s.option(form.ListValue, 'some_choice', _('A select element'));
o.value('choice1', _('The first choice'));
o.value('choice2', _('The second choice'));
m.render().then((node) => {
document.body.appendChild(node);
});