Use the field settings instead of code.