move form code to partial