Skip to content

Commit 9f1b07e

Browse files
author
Sebastian Thulin
committed
fix: pass module id
1 parent 30285f0 commit 9f1b07e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

source/php/Module/FrontendForm.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ public function data(): array
9797
$data = [];
9898
$fields = (object) $this->getFields();
9999

100+
//The module id
101+
$data['moduleId'] = $this->ID;
102+
103+
//Steps
100104
$data['steps'] = $this->formatSteps->formatSteps($fields->formSteps ?? []);
105+
106+
//Language
101107
$data['lang'] = $this->getLang();
102108

103109
return $data;

source/php/Module/views/frontend-form.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
@includeWhen(empty($hideTitle) && !empty($postTitle), 'partials.module-title')
1111

12-
@form([])
12+
@form([
13+
'attributeList' => [
14+
'data-js-frontend-form-id' => $moduleId,
15+
],
16+
])
1317
@foreach($steps as $index => $step)
1418
@include('step', ['step' => $step, 'index' => $index])
1519
@endforeach

0 commit comments

Comments
 (0)