Creatable Combobox

Content Type: Widget
Categories: User Interface

Overview

Creatable Combobox

A searchable combobox for selecting an existing option — or, when nothing matches, creating a new one right there in the field. Built for situations where the list of valid values grows over time and forcing users through a separate "manage options" page just to add one new entry gets in the way of their actual task.

Why use it

Standard reference selectors only let users pick from what already exists. If the option they need isn't there yet, they have to stop, navigate elsewhere (or wait for an admin) to create it, then come back and try again. Creatable Combobox removes that detour: type a value, and if it's new, select "Create: …" to create it inline and have it selected immediately — no context switch, no separate screen.

Typical use cases include tagging (categories, labels, interaction types), free-form-but-controlled reference data (e.g. a "Source" or "Channel" field that should stay a proper entity for reporting, not a plain text field), and any picklist that's expected to grow organically as users encounter new values.

How it works

The widget's "Options source" property points at any list of objects (an XPath, association, or microflow/nanoflow datasource). When a typed value doesn't match an existing option, the widget calls a "Create action" — a microflow or nanoflow you build in Studio Pro — passing along the typed text. That action creates the new object and assigns it to the selection. No commit is required inside the action: the new object is only persisted when the surrounding form or page is actually saved, exactly like any other in-progress edit.

Single or multiple selection

The "Selection" property accepts either a Reference (one-to-one selection) or a Reference Set association. With a Reference, the widget always behaves as a single-select field. With a Reference Set, a "Selection mode" property lets you choose between single-pick and multi-pick — in multi-select mode, chosen options are shown as removable chips and multiple values can be added in one session without closing the dropdown.

Fits your app's look

Rather than shipping its own visual style, the widget reuses the same Atlas core CSS classes and DOM structure as Mendix's built-in Combobox widget. That means it inherits your app's colors, spacing, and border radius automatically, and stays visually consistent even as your theme evolves — no separate styling to maintain.

Accessibility

Full keyboard support (arrow keys to navigate, Enter to select or create, Escape to close, Backspace to remove the last selection), proper ARIA combobox/listbox roles, and screen-reader-friendly option labeling are built in from the start.

Feedback, not silent failure

If the widget is misconfigured — for example, a "Create action" that creates the object but forgets to assign the selection — or the underlying data has an issue (like a duplicate empty caption), the problem is shown directly in the dropdown instead of failing quietly, so misconfigurations are caught during setup rather than by end users in production.


Documentation

Typical usage scenario

Use Creatable Combobox anywhere you need a picklist that is expected to grow over time, and you don't want to send users to a separate screen just to add one new value. Common cases: tagging fields (categories, interaction types, labels), a "Source" or "Channel" field that needs to stay a real entity for reporting rather than free text, or any lookup list maintained collaboratively by end users rather than curated up front by an admin.

Instead of forcing a stop-navigate-create-return flow, the user types a value directly into the field. If it matches an existing option, they select it as normal. If it doesn't, a "Create: …" row appears; selecting it creates the new option on the spot (via a microflow/nanoflow you configure) and selects it immediately — no page navigation, no separate form.

Features and limitations

Features

  • Type-ahead search over any list-backed data source (XPath, association, or microflow/nanoflow datasource).
  • Create a new option inline when the typed value has no match, via a Studio Pro-configured microflow or nanoflow.
  • Works with both Reference (single-select only) and Reference Set associations; on a Reference Set, a "Selection mode" property switches between single-pick and multi-pick (chip-based) behavior.
  • Newly created options are not committed by the widget — they are only persisted when the surrounding form/page is saved, just like any other in-progress edit.
  • Full keyboard support (arrow keys, Enter, Escape, Backspace to remove the last selection) and ARIA combobox/listbox roles.
  • Reuses the same Atlas core CSS classes as Mendix's built-in Combobox widget, so it looks and feels consistent with the rest of the app and tracks theme changes automatically.
  • Configuration mistakes (e.g. a create action that doesn't assign the selection) and data issues (e.g. a duplicate empty caption) are surfaced as an in-dropdown message rather than failing silently.

Limitations

  • A newly created, not-yet-committed option will not appear as a row in the dropdown list until the form/page is saved — it is shown correctly as the current selection in the meantime, just not (yet) as a separate pickable row if the dropdown is reopened before saving.
  • The widget matches a freshly created option back to the selection by caption text, not by ID (no ID is available client-side for an object created via microflow/nanoflow). Keep captions effectively unique within a given options list to avoid ambiguous matches.
  • "Selection mode" only has an effect when "Selection" is a Reference Set; setting it to "Multiple" on a plain Reference is reported as a configuration error rather than silently ignored.

Dependencies

  • Mendix Studio Pro 10 or higher, React Client.
  • A microflow or nanoflow you build yourself for the "Create action" property (see Configuration below) — there is no dependency on any other marketplace module.

Installation

  1. Download the widget from the Marketplace, or import the .mpk via App Store in Studio Pro.
  2. Synchronize your app directory (F4) so the widget appears in the toolbox under "Input elements".
  3. Drag the widget onto a page/form, inside the context of the entity that will hold the selection.

Configuration

Property

What to set

Options source

The list of selectable option objects (e.g. an XPath or association over the target entity).

Option caption

The String attribute whose value is shown for each option.

Selection

A Reference or Reference Set association on the context entity that stores the selected option(s).

Selection mode

Single or Multiple — only relevant when Selection is a Reference Set.

New value attribute

A String attribute on the context entity; the widget writes the typed text here before running "Create action".

Create action

A microflow/nanoflow that reads "New value attribute", creates the new option (without committing it), writes the text into its caption attribute, and assigns the new object to "Selection" itself.

The "Create action" flow is the one piece of configuration you must build yourself: it needs to create the option object, set its caption, and assign it to "Selection" — all without committing. See the widget's own documentation/comments for a step-by-step breakdown if you're setting this up for the first time.

Known bugs

None currently known. If a "Create action" is misconfigured (for example, it forgets to assign "Selection"), the widget will report that clearly as an in-dropdown error rather than fail silently — this is expected behavior, not a bug.

Frequently Asked Questions

Why doesn't my newly created option show up in the dropdown list right after I create it?

Because it isn't committed to the database yet — it only appears as a pickable row once the object is actually persisted (typically when you save the form). It is already correctly selected in the meantime.

Can I use this with a one-to-many or many-to-many association?

Yes — set "Selection" to a Reference Set and choose "Selection mode: Multiple" for multi-select (chips), or "Single" if you want single-pick behavior on a Reference Set.

Do I need a nanoflow, or can I use a microflow?

Either works for "Create action" — use a nanoflow for a fully client-side experience, or a microflow if the creation logic needs server-side access.


Releases

Version: 1.0.1
Framework Version: 11.12.2
Release Notes:

Creatable Combobox v1.0.1

Bug fixes and visual polish following the v1.0.0 release — no property or configuration changes, safe to update from v1.0.0 without reconfiguring existing widget instances.

Fixed

  • "Clear all" in multi-select mode previously removed only the last selected chip instead of every selection; it now correctly clears all of them in one action.
  • Pressing Enter in the input no longer accidentally submits the surrounding Mendix form — it's now correctly scoped to the widget's own selection/create handling.
  • The field's height in multi-select mode now matches the native Mendix Combobox exactly, whether or not any options are selected (previously a few pixels shorter due to an extra margin carried over from the native widget's own CSS that didn't apply the same way here).
  • The multi-select checkmark next to each option now renders as a native-style checkbox (matching the app's theme) instead of a plain checkmark character.
  • Field-level and chip "remove" buttons now use the same "X" icon as the native Combobox, replacing a plain text glyph, with corrected alignment and spacing.


Version: 1.0.0
Framework Version: 11.12.2
Release Notes:

Creatable Combobox v1.0.0

Initial release. A combobox input that lets users pick an existing option or, when their search doesn't match anything, create a new one on the fly — no separate "add new" screen or nanoflow trigger needed elsewhere on the page.

Key features:

  • Create inline: typing a value that isn't in the list shows a "Create: …" option. Selecting it runs a configurable microflow/nanoflow that creates the new option and assigns it to the selection — no commit required, so the new record is only persisted when the surrounding form is saved.
  • Single or multi-select: works with both Reference and Reference Set associations. With a Reference Set, a "Selection mode" property lets you choose single-pick or multi-pick (chip-based) behavior.
  • Matches native styling: built on the same Atlas core form-control classes and DOM structure as Mendix's own Combobox widget, so it looks and behaves consistently with the rest of your forms and tracks theme changes automatically.
  • Accessible: full keyboard navigation (arrow keys, Enter, Escape, Backspace to remove), ARIA combobox/listbox roles, and screen-reader-friendly labeling.
  • Clear error feedback: misconfiguration (e.g. a create action that doesn't assign the selection) or data issues (e.g. duplicate empty captions) are surfaced directly in the dropdown instead of failing silently.

Compatible with the Mendix React Client.