Skip to content

Commit

Permalink
[TASK] Move navigation default value
Browse files Browse the repository at this point in the history
The hidden __currentStep field contains the next step of the form. This is needed if in case of an invisible recaptcha the form gets submitted via JavaScript.
  • Loading branch information
garbast committed Aug 17, 2024
1 parent 70e325c commit 5355485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Resources/Private/Partials/Form/Navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<nav class="form-navigation">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
<f:if condition="{form.formDefinition.renderingOptions.useInvisibleRecaptcha}">
<f:form.hidden property="__currentPage" value="{form.pages -> f:count()}" respectSubmittedDataValue="false"/>
</f:if>
<f:if condition="{form.previousPage}">
<span class="btn-group previous">
<f:form.button property="__currentPage" value="{form.previousPage.index}" formnovalidate="formnovalidate" class="btn btn-cancel">
Expand All @@ -25,7 +28,6 @@
<span class="btn-group next submit">
<f:if condition="{form.formDefinition.renderingOptions.useInvisibleRecaptcha}">
<f:then>
<f:form.hidden property="__currentPage" value="{form.pages -> f:count()}" respectSubmittedDataValue="false"/>
<r:form.recaptcha>
<f:if condition="{showCaptcha}">
<f:then>
Expand Down

0 comments on commit 5355485

Please sign in to comment.