js function to submit trial upload form