Moved editformsubmit code from testing module