How to display the form in a new webpage with validation?