util.dataforms: Add support for <required/> fields
authorMatthew Wild <mwild1@gmail.com>
Sat, 4 Apr 2009 15:23:32 +0000 (16:23 +0100)
committerMatthew Wild <mwild1@gmail.com>
Sat, 4 Apr 2009 15:23:32 +0000 (16:23 +0100)
util/dataforms.lua

index 73a78f0878f62e712b7604d39505705677ae23f8..92d4f619d7ea2566d9d4c4c1636c3e76ab5c29fd 100644 (file)
@@ -57,6 +57,10 @@ function form_t.form(layout, data)
                        end
                end
                
+               if field.required then
+                       form:tag("required"):up();
+               end
+               
                -- Jump back up to list of fields
                form:up();
        end