add .required class to input / select fields automatically if they are set as required. Closes #1967