Much of this form code is repeated from the article index. Maybe this could be extracted into a partial?