597 add form flow fixes

closes #597 
this function needs an accompanying test