Factoring out of newpost-form.