adds conditional logic to form partial for events, moves logic to events_helper