Changeset

8945:cbeb1a045eb6

util.dataforms: Add support for field descriptions in <desc>
author Kim Alvefur <zash@zash.se>
date Wed, 27 Jun 2018 20:06:13 +0200
parents 8944:200ec7d38a0e
children 8946:3a095233e178
files util/dataforms.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/dataforms.lua	Wed Jun 27 16:00:54 2018 +0100
+++ b/util/dataforms.lua	Wed Jun 27 20:06:13 2018 +0200
@@ -38,6 +38,10 @@
 		-- Add field tag
 		form:tag("field", { type = field_type, var = field.name, label = field.label });
 
+		if field.desc then
+			form:text_tag("desc", field.desc);
+		end
+
 		local value = (data and data[field.name]) or field.value;
 
 		if value then