Hiding Elements with a toggle

The first one makes sense why it doesn’t work and has the behavior you described. It launches once the page loads then checks to to see if the slider is in the on position. If it is, then it hides box51 and 52 it it isn’t check then it expands box 52 and 53. It only triggers when the page loads, not when toggled.

The second is the better approach. There is another part to adding actions like you have shown. Putting the code in for the Export Function switch1 is not enough. You have to also manually add the action in the developer console. If you haven’t already done that then you can by clicking the element (Switch) then in the bottom right hand corner of the developer pain you click to add the onChange action. If you haven’t done that then you definitely must. It will add the code again to the bottom of your page. Copy in the relevant parts and try again.