Variable SHORTCODE_REF_PARTIALConst
SHORTCODE_REF_PARTIAL: "{{#if embedded}}\n<div class=\"form-group stacked\">\n <label>{{localize label}}</label>\n <select name=\"{{name}}\"{{#if hint}} data-tooltip=\"{{localize hint}}\"{{/if}}>\n {{selectOptions options selected=value valueAttr=\"value\" labelAttr=\"label\" blank=blankLabel}}\n </select>\n</div>\n{{else}}{{#if field}}{{formGroup field rootId=rootId classes=\"text-field\" stacked=true value=value}}{{else}}<label class=\"form-group stacked\"><span>{{localize label}}</span>\n <input type=\"text\" name=\"{{name}}\" value=\"{{value}}\"{{#if hint}} data-tooltip=\"{{localize hint}}\"{{/if}} /></label>{{/if}}{{/if}}" = ...
The reusable shortcode-reference field widget (#974), registered as the named partial
shortcodeRefField. It renders a reference to another document by its shortcode either as a dropdown (when the referencing item is embedded on an actor, so a candidate list exists) or as the current free-text input (for a world/pack item, where no candidate list exists).Invocation context (all optional unless noted):
embedded— dropdown when truthy, free-text fallback otherwise.name(required) — the form field path (e.g."system.parentSkillCode").value— the currently-stored shortcode.options—{value,label,unresolved?}[]frombuildRefOptions(sohl.document.item.logic.buildRefOptions).label/hint— localization keys for the control's label and tooltip.blankLabel— when present, a leading blank<option>with this (already localized) label, letting the author clear the reference.field/rootId— the DataModel field and its id for the free-text fallback viaformGroup; whenfieldis absent the fallback is a plain labeled text input (for app-config dialogs that hand-roll their inputs).The stored value is unchanged in either mode — always the shortcode string — so no data-model change or migration is involved.