libs/cbi: Prevent SimpleForms from prematurely parsing form data
[project/luci.git] / libs / cbi / luasrc / cbi.lua
index 3bb56f36cac517b5a0f93975143be38fc2875d2b..9996c8418dc27962d630d4ec41273c3d52194ec0 100644 (file)
@@ -260,7 +260,9 @@ function SimpleForm.__init__(self, config, title, description, data)
 end
 
 function SimpleForm.parse(self, ...)
-       Node.parse(self, 1, ...)
+       if luci.http.formvalue("cbi.submit") then
+               Node.parse(self, 1, ...)
+       end
                
        local valid = true
        for i, v in ipairs(self.children) do