diff --git a/ext/afform/core/CRM/Afform/BAO/AfformSubmission.php b/ext/afform/core/CRM/Afform/BAO/AfformSubmission.php
index 5e2bc34bb7c0..6985388f71c7 100644
--- a/ext/afform/core/CRM/Afform/BAO/AfformSubmission.php
+++ b/ext/afform/core/CRM/Afform/BAO/AfformSubmission.php
@@ -3,4 +3,17 @@
class CRM_Afform_BAO_AfformSubmission extends CRM_Afform_DAO_AfformSubmission {
+ /**
+ * Pseudoconstant callback for `afform_name`
+ * @return array
+ */
+ public static function getAllAfformsByName() {
+ return \Civi\Api4\Afform::get(FALSE)
+ ->addSelect('name', 'title')
+ ->addOrderBy('title')
+ ->execute()
+ ->indexBy('name')
+ ->column('title');
+ }
+
}
diff --git a/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php b/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php
index c0a9f1c2ef4f..5ab88359cd80 100644
--- a/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php
+++ b/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php
@@ -6,7 +6,7 @@
*
* Generated from org.civicrm.afform/xml/schema/CRM/Afform/AfformSubmission.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3018ef7f1283f7a38cdf9edae76df274)
+ * (GenCodeChecksum:6bffbfbde72fe38c0ab2bb8f49c945b8)
*/
use CRM_Afform_ExtensionUtil as E;
@@ -129,6 +129,9 @@ public static function &fields() {
'bao' => 'CRM_Afform_DAO_AfformSubmission',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => [
+ 'type' => 'EntityRef',
+ ],
'add' => '5.41',
],
'afform_name' => [
@@ -143,6 +146,12 @@ public static function &fields() {
'entity' => 'AfformSubmission',
'bao' => 'CRM_Afform_DAO_AfformSubmission',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Select',
+ ],
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Afform_BAO_AfformSubmission::getAllAfformsByName',
+ ],
'add' => '5.41',
],
'data' => [
@@ -168,6 +177,9 @@ public static function &fields() {
'entity' => 'AfformSubmission',
'bao' => 'CRM_Afform_DAO_AfformSubmission',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Select Date',
+ ],
'readonly' => TRUE,
'add' => '5.41',
],
diff --git a/ext/afform/core/xml/schema/CRM/Afform/AfformSubmission.xml b/ext/afform/core/xml/schema/CRM/Afform/AfformSubmission.xml
index 28278d26ab74..4d9b27ee0c6d 100644
--- a/ext/afform/core/xml/schema/CRM/Afform/AfformSubmission.xml
+++ b/ext/afform/core/xml/schema/CRM/Afform/AfformSubmission.xml
@@ -27,6 +27,9 @@