0

I am new to openWrt. I have a selectbox with two options. How can I write condition in Lua to execute some commands when selecting these options.

<select id="AP_mode" name="AP_mode" class="AP_mode">
    <option value="" disabled selected>Ap Mode</option>
    <option value="0">Access Point1</option>
    <option value="1">Access Point2</option>
</select>
Piglet
  • 27,501
  • 3
  • 20
  • 43

1 Answers1

0

You can use depends() function. Suppose you want to display some text box or value if the option is 0. then you can give.

p:depends("AP_node","0")
p:value(variable,translate(value))