Refactor the active form widget