Software /
code /
prosody
Changeset
957:34f8cda285c4
util.dataforms: Allow form layouts to specify default values for fields
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Apr 2009 19:42:01 +0100 |
parents | 956:4c3f3d60a2f4 |
children | 958:172fb9a73017 |
files | util/dataforms.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Sun Apr 05 19:41:24 2009 +0100 +++ b/util/dataforms.lua Sun Apr 05 19:42:01 2009 +0100 @@ -29,7 +29,7 @@ -- Add field tag form:tag("field", { type = field_type, var = field.name, label = field.label }); - local value = data[field.name]; + local value = data[field.name] or field.value; -- Add value, depending on type if field_type == "hidden" then