Comparison

util/dataforms.lua @ 952:ef648f49e734

util.dataforms: Add support for <required/> fields
author Matthew Wild <mwild1@gmail.com>
date Sat, 04 Apr 2009 16:23:32 +0100
parent 951:4b9207949735
child 953:bed748f5dbb1
comparison
equal deleted inserted replaced
951:4b9207949735 952:ef648f49e734
55 for line in value:gmatch("([^\r\n]+)\r?\n*") do 55 for line in value:gmatch("([^\r\n]+)\r?\n*") do
56 form:tag("value"):text(line):up(); 56 form:tag("value"):text(line):up();
57 end 57 end
58 end 58 end
59 59
60 if field.required then
61 form:tag("required"):up();
62 end
63
60 -- Jump back up to list of fields 64 -- Jump back up to list of fields
61 form:up(); 65 form:up();
62 end 66 end
63 return form; 67 return form;
64 end 68 end