Sat, 10 Oct 2009 03:09:15 +0100
util.dataforms: Small fix to allow generating forms without specifying any input data
util/dataforms.lua | file | annotate | diff | comparison | revisions |
--- a/util/dataforms.lua Sat Oct 10 02:21:25 2009 +0100 +++ b/util/dataforms.lua Sat Oct 10 03:09:15 2009 +0100 @@ -37,7 +37,7 @@ -- Add field tag form:tag("field", { type = field_type, var = field.name, label = field.label }); - local value = data[field.name] or field.value; + local value = (data and data[field.name]) or field.value; -- Add value, depending on type if field_type == "hidden" then