fixed the hide-fields example code to work with the new event structure