Skip to content

Commit 3dc44f5

Browse files
committed
fix(htmx): set the current page via site()->visit($page)
1 parent 65ad147 commit 3dc44f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

classes/Models/FormPage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ public function render(
361361
if ($mode === 'htmx' && Htmx::isHtmxRequest()) {
362362
try {
363363
$page = DreamForm::findPageOrDraftRecursive(Htmx::decrypt($kirby->request()->body()->get('dreamform:page')));
364+
// set the current page
365+
site()->visit($page);
366+
364367
$attr = Json::decode(Htmx::decrypt($kirby->request()->body()->get('dreamform:attr')));
365368

366369
// if an error is thrown, this means the data must have been tampered with

0 commit comments

Comments
 (0)