Coded JS to handle settings form changes