Adding method of serializing form data