Updating the toggle switches on the frontend