DynamicForm.Instance.Elements (DynamicForm v1.0.0)

Copy Markdown View Source

Queries over a form definition's element tree.

All functions share the same scope rule: static panels (Instance.Element containers) are transparent — their questions belong to the enclosing scope — while a paneldynamic question's templateElements form their own scope and are never descended into.

Internal module — not part of the public API.

Summary

Functions

The first question with the given name, or nil.

The paneldynamic question at a dot-separated entry path, or nil.

Flat list of every file question in the tree.

Flat list of every question in the tree, in render order.

Map of question name to question for one scope.

Functions

get_question(elements, name)

The first question with the given name, or nil.

get_question_by_path(elements, path)

The paneldynamic question at a dot-separated entry path, or nil.

Path segments alternate question names and entry indexes ("addresses", or "contacts.0.phones" when nested). Each name resolves within its own scope — the given elements for the first segment, then each matched question's templateElements — so questions in different scopes may share a name.

list_file_questions(elements)

Flat list of every file question in the tree.

list_questions(elements)

Flat list of every question in the tree, in render order.

A paneldynamic question appears as a single entry; its template questions are not included.

questions_by_name(elements)

Map of question name to question for one scope.

When two questions share a name, the later one wins.