diff --git a/app/templates/EnrollmentFlows/start.inc b/app/templates/EnrollmentFlows/start.inc index b4941bc5a..6026703ea 100644 --- a/app/templates/EnrollmentFlows/start.inc +++ b/app/templates/EnrollmentFlows/start.inc @@ -38,14 +38,11 @@ $modelTable = $this->Tab->getModelTableReference($modelsName); // For now, we just request the enrollee email. We're only called if // collect_enrollee_email is true, so we don't need to check it, though // if we ever add more fields to the start form we should. -print $this->element('form/listItem', [ - 'arguments' => [ - 'fieldName' => 'enrollee_email', - 'fieldOptions' => [ - 'required' => true - ], +$fields = [ + 'enrollee_email' => [ + 'required' => true, 'fieldType' => 'string' ] -]); +]; // Any hidden fields?? diff --git a/app/templates/EnrollmentFlows/start.php b/app/templates/EnrollmentFlows/start.php index 7dd28ede7..3c7066083 100644 --- a/app/templates/EnrollmentFlows/start.php +++ b/app/templates/EnrollmentFlows/start.php @@ -27,6 +27,10 @@ declare(strict_types = 1); +// Enrollment Flow Start has its own file of fields +$modelsName = $this->getName(); +$templatePath = $vv_template_path ?? ROOT . DS . "templates" . DS . $modelsName; +include($templatePath . DS . 'start.inc'); ?>