Skip to content

Commit

Permalink
Merge branch '3' into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 15, 2023
2 parents 65f2c18 + dd2fa62 commit ee48cf9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Control/ElementFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DNADesign\ElementalUserForms\Control;

use DNADesign\Elemental\Models\BaseElement;
use DNADesign\Elemental\Controllers\ElementController;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
Expand Down Expand Up @@ -55,7 +56,11 @@ public function finished()
$user->finished();

$page = $this->getPage();
$controller = Injector::inst()->create($page->getControllerName(), $this->element->getPage());

while ($page instanceof BaseElement) {
$page = $page->getPage();
}
$controller = Injector::inst()->create($page->getControllerName(), $page->data());
$element = $this->element;

return $controller->customise([
Expand Down

0 comments on commit ee48cf9

Please sign in to comment.