refactor post form and postcomment form