diff --git a/InvenTree/templates/js/forms.js b/InvenTree/templates/js/forms.js
index 8d74299975..c741530523 100644
--- a/InvenTree/templates/js/forms.js
+++ b/InvenTree/templates/js/forms.js
@@ -176,9 +176,14 @@ function constructCreateForm(url, fields, options={}) {
var html = '';
for (const key in fields) {
- //console.log('field:', key);
- html += constructField(key, fields[key], options);
+ var field = fields[key];
+
+ console.log(key, field.label, field.help_text);
+
+ var f = constructField(key, field, options);
+
+ html += f;
}
var modal = '#modal-form';
@@ -218,16 +223,19 @@ function constructField(name, parameters, options={}) {
html += constructLabel(name, parameters);
html += `
`;
-
+
html += constructInput(name, parameters, options);
- html += constructHelpText(name, parameters, options);
-
+
+ if (parameters.help_text) {
+ html += constructHelpText(name, parameters, options);
+ }
+
// TODO: Add the "error message"
-
+
html += `
`; // controls
-
+
html += ``; // form-group
-
+
return html;
}
@@ -247,15 +255,18 @@ function constructLabel(name, parameters) {
label_classes += ' requiredField';
}
- var html ='';
+ var html = `