Trim form inputs before sending requests