js fix for data input in chrome in tickets template; not DRY