How to allow users to preview input data before submitting the form?