Added check for number of datafiles in form.
Moved check for number of datafiles in form to view.