buildForm method

FormGroup buildForm()

Implementation

FormGroup buildForm() {
  return fb.group(<String, Object>{
    _dateOfReferralKey: FormControl<DateTime>(value: DateTime.now()),
    _administrativeUnitKey: FormControl<String>(
        value: localizations.translate(
            RegistrationDeliverySingleton().boundary!.name.toString())),
    _referredByKey: FormControl<String>(
      value: RegistrationDeliverySingleton().loggedInUserUuid,
      validators: [Validators.required],
    ),
    _referredToKey: FormControl<String>(validators: [Validators.required]),
    _referralReason: FormControl<KeyValue>(value: null),
    _referralComments: FormControl<String>(value: null),
  });
}