Added dynamic form. Fixed error in grappelli