add a first-ugly implementation of the writeFormBody function.