Fixed #23167 -- Added BaseForm.__repr__()

Thanks Keryn Knight for the idea.