work in progress - refactoring dynamic form functions