Added a hook to save the form values into an entity