diff --git a/src/components/Questionnaire/TextInput.tsx b/src/components/Questionnaire/TextInput.tsx index 33f2db630..f4767028d 100644 --- a/src/components/Questionnaire/TextInput.tsx +++ b/src/components/Questionnaire/TextInput.tsx @@ -81,11 +81,10 @@ const TextInput: FC = ({ }; const onChangeWrapper = (event: React.ChangeEvent) => { - const newVal = event.target.value; - if (typeof onChange === "function") { onChange(event); } + const newVal = event.target.value; processValue(newVal); setError(false); diff --git a/src/content/questionnaire/sections/B.tsx b/src/content/questionnaire/sections/B.tsx index 6a443c44f..34a40d32f 100644 --- a/src/content/questionnaire/sections/B.tsx +++ b/src/content/questionnaire/sections/B.tsx @@ -303,6 +303,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection name="program[abbreviation]" value={predefinedProgram ? programOption?.abbreviation : program?.abbreviation} filter={(input: string) => filterAlphaNumeric(input, "- ")} + onChange={(e) => { e.target.value = e.target.value.toUpperCase(); }} maxLength={20} placeholder="20 characters allowed" hideValidation={readOnlyProgram} @@ -370,6 +371,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection name="study[abbreviation]" value={study.abbreviation} filter={(input: string) => filterAlphaNumeric(input, "- ")} + onChange={(e) => { e.target.value = e.target.value.toUpperCase(); }} maxLength={20} placeholder="20 characters allowed" readOnly={readOnlyInputs}