How to print when form is submitted?