# HG changeset patch # User Matthew Wild # Date 1259179156 0 # Node ID 7ddd24d8260c8cfc27f43772cbb8f2163e530ad2 # Parent 98a880fda81358c2b604f1b797da03fc12eb5f33# Parent b94bb1334029734dc175f72f29272652382a37f3 Merge with trunk diff -r b94bb1334029 -r 7ddd24d8260c util/dataforms.lua --- a/util/dataforms.lua Thu Nov 26 00:05:18 2009 +0500 +++ b/util/dataforms.lua Wed Nov 25 19:59:16 2009 +0000 @@ -93,7 +93,13 @@ local data = {}; for field_tag in stanza:childtags() do - local field_type = field_tag.attr.type; + local field_type; + for n, field in ipairs(layout) do + if field.name == field_tag.attr.var then + field_type = field.type; + break; + end + end local reader = field_readers[field_type]; if reader then