QuestionI added
orderedTabs to the
md_props_bag of a table, but the tabs of the edit form still show up in the old order (or there are no tabs at all). What does
orderedTabs actually match, and when is it applied?
AnswerorderedTabs only sorts tabs that exist, and tabs exist only if the table has the tab-edit option (
md_tab_edit) enabled. Without it the form renders a single flat list of fields and the array is never read. The same happens if the table uses a custom edit template: the template replaces the default form.
What it matches- Each entry is compared with the
mc_edit_associated_tab value of the editable columns, case-insensitively. "General" and "general" are the same tab. - It is compared with the raw tab name, not with the translated header. If the header shows "Generale", the entry must still be the key stored in the column, not the translation.
- Columns hidden in edit do not create tabs. Editable columns with no
mc_edit_associated_tab are grouped in a tab named non_associati_a_tab, which you can list as well. - Entries that match no tab are ignored. Tabs you do not list are placed after the listed ones, in their original order.
Which tab opens firstAfter sorting, the first visible tab is the selected one. Reordering therefore also changes the tab the user lands on.
{
"archetypes": {
"form": {
"columns": 2,
"orderedTabs": ["general", "advanced", "audit"]
}
}
}
Common mistakes: a typo in a tab key (silently ignored), listing the translated label instead of the key, and expecting the order to change on a table where the tab option is off.
Documentation: Form (parametric-dialog)