allow Handlebars string objects to be passed in as field_name
This commit is contained in:
@@ -100,6 +100,8 @@ Hooks.once("init", async function() {
|
||||
|
||||
Handlebars.registerHelper({
|
||||
DSA41_input: (field_name, options) => {
|
||||
field_name = field_name.toString();
|
||||
|
||||
let fields = field_name.startsWith("system.") ? options.data.root.document.system.schema.fields : options.data.root.document.schema.fields;
|
||||
let field = foundry.utils.getProperty(fields, field_name.replace(/^(system\.)/, "").replace(".", ".fields."));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user