Form not storing the data submitted and displaying only date