webmcp

diff framework/env/ui/field/hidden.lua @ 0:9fdfb27f8e67

Version 1.0.0
author jbe/bsw
date Sun Oct 25 12:00:00 2009 +0100 (2009-10-25)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/ui/field/hidden.lua	Sun Oct 25 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +--[[--
     1.5 +ui.field.hidden{
     1.6 +  ...             -- generic ui.field.* arguments, as described for ui.autofield{...}
     1.7 +}
     1.8 +
     1.9 +This function inserts a hidden form field in the active slot. It is a high level function compared to ui.hidden_field{...}. If called inside a read-only form, then this function does nothing.
    1.10 +
    1.11 +--]]--
    1.12 +
    1.13 +function ui.field.hidden(args)
    1.14 +  ui.form_element(args, {fetch_value = true}, function(args)
    1.15 +    if not args.readonly then
    1.16 +      ui.hidden_field{
    1.17 +        attr  = args.attr,
    1.18 +        name  = args.html_name,
    1.19 +        value = args.value
    1.20 +      }
    1.21 +    end
    1.22 +  end)
    1.23 +end

Impressum / About Us