From d117f5a4644d43285628a5abb1482cca4f1f8640 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Thu, 11 Jan 2024 09:45:13 -0500 Subject: [PATCH] Fix People fields.inc (CFM-373) --- app/templates/People/fields.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/templates/People/fields.inc b/app/templates/People/fields.inc index 4bdb5b69e..dee3cd5be 100644 --- a/app/templates/People/fields.inc +++ b/app/templates/People/fields.inc @@ -33,11 +33,19 @@ if($vv_action == 'add') { foreach(['honorific', 'given', 'middle', 'family', 'suffix'] as $f) { if(in_array($f, $vv_permitted_name_fields)) { - print $this->Field->control('names.0.'.$f, ['required' => in_array($f, $vv_required_name_fields)]); + print $this->Field->control( + fieldName: 'names.0.'.$f, + options: ['required' => in_array($f, $vv_required_name_fields)], + controlType: 'string' + ); } } - print $this->Field->control('names.0.type_id', ['empty' => false, 'default' => $vv_default_name_type]); + print $this->Field->control( + fieldName: 'names.0.type_id', + options: ['empty' => false, 'default' => $vv_default_name_type], + controlType: 'string' + ); // AR-Name-1 Since this is the first name for this Person, it must be // designated primary