Hi
I'm playing a little bit with luci .
Basically I'd like to achieve the same functionality provided by the luci.depend but since this method only seems to accept plain text as pattern to compare, and I'd like to use within luci.deppend a variable , not a fixed string.
There is a way to use luci.depend with the second argument as a variable ?
If not, how i could put into a variable the content of an already value from luci
var value /// value to check
value = something from some where
o = s.taboption('general', form.ListValue, 'other_option', _('Other otion '));
o = s.taboption('general', form.ListValue, 'cfg_new_field ', _('MY new field selection which dependes on previous other_option '));
o.value('1');
o.value('2');
o.depends( other_option, value )
o.default = '1';
As you could see from the code snipet , the idea is perform depend, but with the value from a variable, in my testing instead to perform the comparison with the value, the comparison is with the name of the variable,
Any one has experience with this feature ?
Or in other way around, how i could put the other_option value into a variable to perform with that any logic with it ?