Skip to content

Commit

Permalink
Merge pull request jsonform#215 from coreyfournier/patch-1
Browse files Browse the repository at this point in the history
Update jsonform.js to allow numbers with decimals by setting the step
  • Loading branch information
tchapi committed Mar 13, 2019
2 parents 7a21dcb + 4ae0b18 commit 97802c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ var inputFieldTemplate = function (type) {
'name="<%= node.name %>" value="<%= escape(value) %>" id="<%= id %>"' +
'<%= (node.disabled? " disabled" : "")%>' +
'<%= (node.readOnly ? " readonly=\'readonly\'" : "") %>' +
'<%= (node.schemaElement.step > 0 ? " step='" + node.schemaElement.step + "'" : "")%>' +
'<%= (node.schemaElement && node.schemaElement.maxLength ? " maxlength=\'" + node.schemaElement.maxLength + "\'" : "") %>' +
'<%= (node.schemaElement && node.schemaElement.required && (node.schemaElement.type !== "boolean") ? " required=\'required\'" : "") %>' +
'<%= (node.placeholder? " placeholder=" + \'"\' + escape(node.placeholder) + \'"\' : "")%>' +
Expand Down

0 comments on commit 97802c7

Please sign in to comment.