added form functionality to apply page;