diff --git a/packages/survey_form/lib/pages/survey_form_view.dart b/packages/survey_form/lib/pages/survey_form_view.dart index fa02949dc..6f02544c9 100644 --- a/packages/survey_form/lib/pages/survey_form_view.dart +++ b/packages/survey_form/lib/pages/survey_form_view.dart @@ -773,6 +773,38 @@ class SurveyFormViewPageState extends LocalizedState { ); }, ), + BlocBuilder( + builder: (context, state) { + return (controller[index].text == item.values?[1].trim() && + !(isHealthFacilityWorker && + widget.referralClientRefId != null) && item.dataType != 'SingleValueList') + ? Padding( + padding: const EdgeInsets.only( + left: 4.0, + right: 4.0, + bottom: 16, + ), + child: DigitTextField( + maxLength: 1000, + isRequired: true, + controller: additionalController[index], + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}.ADDITIONAL_FIELD', + ), + validator: (value1) { + if (value1 == null || value1 == '') { + return localizations.translate( + i18.common.coreCommonReasonRequired, + ); + } + + return null; + }, + ), + ) + : const SizedBox(); + }, + ), BlocBuilder( builder: (context, state) { final hasError = (item.required == true &&