Skip to content

Commit

Permalink
Style fixup re: b36320f
Browse files Browse the repository at this point in the history
Add example for htmlMetaData
  • Loading branch information
tchapi committed Jan 8, 2019
1 parent b36320f commit cff42c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ var initializeTabs = function (tabs) {
jsonform.fieldTemplate = function(inner) {
return '<div ' +
'<% for(var key in elt.htmlMetaData) {%>' +
'<%= key %>' +
'=" ' +
'<%= elt.htmlMetaData[key] %>' +
'" ' +
'<%= key %>="<%= elt.htmlMetaData[key] %>" ' +
'<% }%>' +
'class="form-group jsonform-error-<%= keydash %>' +
'<%= elt.htmlClass ? " " + elt.htmlClass : "" %>' +
Expand Down
4 changes: 4 additions & 0 deletions playground/examples/fields-common.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"append": "today",
"notitle": true,
"htmlClass": "usermood",
"htmlMetaData":{
"style":"border: 1px solid blue",
"data-title":"Mood"
},
"fieldHtmlClass": "input-xxlarge",
"placeholder": "incredibly and admirably great"
}
Expand Down

0 comments on commit cff42c2

Please sign in to comment.