Add Javascript to make match form work