[luci] luci Digest, Vol 76, Issue 10
Deric Panet-Raymond
dpraymond at satcomdirect.com
Fri Oct 31 15:04:36 CET 2014
username = section:taboption("general", Value, "username", translate("Username"))
password = section:taboption("general", Value, "password", translate("Password"))
password.password = true
service = section:taboption("general", Value, "service",
translate("Service Name") )
service:value("1","Service One (A)")
service:value("2","Service Two")
service:value("3","Service Three")
service:value("4","Service Four (A)")
service:value("5","Service Five")
service:value("6","Service Six (A)")
service:value("7","Service Seven (A)")
service.rmempty = false
So when the user selects a Serivce value in the drop-down that has a (A) in the name I want to specify a set username and password in those fields before submitting the form request, I.e on change service set username = x and password = y. I managed to do this in the validator for service, but while it set the field values after hitting save and apply ( I.e they showed up on the form in the page) they were NOT written to the uci file unless I hit Save and Apply again, if you refreshed the page before hitting save and apply the values were erased from the form fields.
Thanks,
Deric.
From: Wandy Lau <xdragon007 at gmail.com<mailto:xdragon007 at gmail.com>>
Reply-To: "luci at lists.subsignal.org<mailto:luci at lists.subsignal.org>" <luci at lists.subsignal.org<mailto:luci at lists.subsignal.org>>
Date: Friday, October 31, 2014 at 1:59 AM
To: "luci at lists.subsignal.org<mailto:luci at lists.subsignal.org>" <luci at lists.subsignal.org<mailto:luci at lists.subsignal.org>>
Subject: Re: [luci] luci Digest, Vol 76, Issue 10
It seems I have encountered this problems before but I am not sure. Can you show some code or make you problems more clear?
Wandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20141031/671dd7a9/attachment.html>
More information about the luci
mailing list