using Constants for forms, stop bad input with try

using a try catch to prevent illegal input in form pages