updateSwitchInput function

Change the value of a switch input on the client