Fix dynamic form by bringing back old code