Hi,
Let's say that we have the following code:
m = Map ("some-module", translate("Users"))
s = m:section(TypedSection, "user", ...)
s:option(Value, "username", translate("User Name"))
s:option(Value, "hostname", translate("Password"))
Upon hitting "Save&Apply", is there a way to create an additional option in "some-module" that is some combination of "username" and "password", say if the user enters "john" and "some.site.com", then I would like to cook the username and hostname with gsub to make "john_some_site_com" like this:
name=string.gsub(**username** .. "_" .. **hostname**, "%W", "_")
but I don't know how to get **username** and **hostname** at the time of hitting "Save&Apply", and I can't find any helpful documentation either! Remember, username and hostname have NOT been saved yet at that moment, so I need some access other than m.uci:get(blablabla).
Can some LuCI deity please help or tell me whether that's even possible?