Skip to content

Commit

Permalink
FIX Tighten routing rule for userforms ping action
Browse files Browse the repository at this point in the history
  • Loading branch information
tiller1010 authored and GuySartorelli committed Aug 16, 2023
1 parent 60717e5 commit 00a25dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _config/routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ After: framework/routes#coreroutes
---
SilverStripe\Control\Director:
rules:
UserDefinedFormController//$Action: SilverStripe\UserForms\Control\UserDefinedFormController
UserDefinedFormController//ping: SilverStripe\UserForms\Control\UserDefinedFormController
1 change: 1 addition & 0 deletions code/Form/UserForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public function getRequiredFields()
->Fields()
->filter('Required', true)
->column('Name');

$requiredNames = array_merge($requiredNames, $this->getEmailRecipientRequiredFields());
$required = UserFormsRequiredFields::create($requiredNames);
$this->extend('updateRequiredFields', $required);
Expand Down

0 comments on commit 00a25dc

Please sign in to comment.