pass in "required" value when building preferred_language form element
authorAlan Dixon <alan.g.dixon@gmail.com>
Fri, 25 Sep 2020 16:11:04 +0000 (12:11 -0400)
committerAlan Dixon <alan.g.dixon@gmail.com>
Fri, 25 Sep 2020 16:11:04 +0000 (12:11 -0400)
CRM/Core/BAO/UFGroup.php

index aca664795e7f2c5987402714aa230db5fe5519cc..88d84f04afa8466f6f9ddab44ca3c82d0585d180 100644 (file)
@@ -2019,7 +2019,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
       $form->add('select', $name, $title, CRM_Core_SelectValues::pmf());
     }
     elseif ($fieldName === 'preferred_language') {
-      $form->add('select', $name, $title, ['' => ts('- select -')] + CRM_Contact_BAO_Contact::buildOptions('preferred_language'));
+      $form->add('select', $name, $title, ['' => ts('- select -')] + CRM_Contact_BAO_Contact::buildOptions('preferred_language'), $required);
     }
     elseif ($fieldName == 'external_identifier') {
       $form->add('text', $name, $title, $attributes, $required);