BUGFIX - when checking if constant is defined, needs to be a string, not the constant itself
added ability to add additional attributes to form fields