Trim form content for whitespace and newline characters