refactored so that form params are retrieved in the formcfg object