refactoring get_form_transition method