Select parts
This example shows how to use the lower level API to create a more complex
select box with optgroups and help text. It also can be used, when select
options are not represented by an iterable of {"value": VALUE, "text": LABEL} objects.
select_box accepts the same arguments as select,
except for options and selected. These parameters
are handled by code responsible for rendering select_option components.
{%- call ui.util.call(show_example) -%}
{%- raw %}
{%- set help_text = ui.field_info("Help text") -%}
{%- call ui.util.call(ui.select_box, label="Complex select", nested_content=help_text) -%}
{%- set values = range(10) -%}
{%- endcall %}
{%- endraw %}
{%- endcall %}