Variable EXPRESSION_FIELD_PARTIALConst
EXPRESSION_FIELD_PARTIAL: "<div class=\"expression-field\">\n {{formGroup field rootId=rootId classes=\"text-field\" stacked=true value=value}}\n <button type=\"button\" class=\"expression-field__edit\" data-action=\"editExpression\" data-field-path=\"{{name}}\"{{#if field.scope}} data-expr-scope=\"{{field.scope}}\"{{/if}} data-tooltip=\"{{localize \"SOHL.ExpressionEditor.editTooltip\"}}\"><i class=\"fa-solid fa-code\"></i></button>\n</div>" = ...
The reusable SafeExpression formula-field widget, registered as the named partial
expressionField. It renders the field'sformGroupplus an edit button that opens the SafeExpression code editor (theeditExpressionsheet action). The stored value is unchanged — always the expression source string.Invocation context:
field(required) — the DataModel field forformGroup.rootId— the control's id.name(required) — the form/update field path (e.g."system.skillBaseFormula").value— the current expression source.The identifiers the expression may use are not declared here: a sohl.core.foundry.SafeExpressionField carries its sohl.entity.expr.ExpressionScope id, which this partial forwards as
data-expr-scopefor the editor to resolve. Nothing about the binding contract is typed into a template (issue #1142).