form serialization in pure js