From a327fd85e24e145cd6f93760edcf1099f10415e6 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 16 Apr 2018 11:14:15 +0100 Subject: [PATCH] Fix template to default typed input field to close #1697 --- nodes/core/core/80-template.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodes/core/core/80-template.html b/nodes/core/core/80-template.html index df173f610..2c121b587 100644 --- a/nodes/core/core/80-template.html +++ b/nodes/core/core/80-template.html @@ -88,7 +88,7 @@ category: 'function', defaults: { name: {value:""}, - field: {value:"payload", validate: RED.validators.typedInput("fieldType")}, + field: {value:"payload", validate:RED.validators.typedInput("fieldType")}, fieldType: {value:"msg"}, format: {value:"handlebars"}, syntax: {value:"mustache"}, @@ -106,6 +106,10 @@ }, oneditprepare: function() { var that = this; + if (!this.field) { + this.field = 'payload'; + $("#node-input-field").val("payload"); + } if (!this.fieldType) { this.fieldType = 'msg'; }