post creation functionality from form to model