Skip to content

Commit 600d04c

Browse files
committed
Add morestep fieldset configuration
1 parent 5960001 commit 600d04c

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

Configuration/TypoScript/Main/Configuration/10_Validation.typoscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ plugin.tx_powermail.settings.setup {
99
# enable serverside validation
1010
server = {$plugin.tx_powermail.settings.validation.server}
1111

12+
morestep {
13+
# enable clientside fieldset validation for morestep forms on step change
14+
fieldset = {$plugin.tx_powermail.settings.validation.morestep.fieldset}
15+
}
16+
1217
unique {
1318
# EXAMPLE: Enable unique check for {email}
1419
#email = 1

Configuration/TypoScript/Main/constants.typoscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ plugin.tx_powermail {
3838

3939
# cat=powermail_additional//0120; type=boolean; label= PHP Server Validation: Validate User Input with PHP on serverside
4040
server = 1
41+
42+
morestep {
43+
# cat=powermail_additional//0130; type=boolean; label= Validate User Fieldset Input on Multistep Forms with JavaScript on step change
44+
fieldset = 0
45+
}
4146
}
4247

4348
receiver {

Resources/Private/Partials/Form/Page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<button type="button" class="btn btn-secondary" data-powermail-morestep-show="{iterationPages.index - 1}">&lt;</button>
1717
</f:if>
1818
<f:if condition="!{iterationPages.isLast}">
19-
<button type="button" class="btn btn-primary" data-powermail-morestep-show="{iterationPages.cycle}" data-powermail-morestep-previous>&gt;</button>
19+
<button type="button" class="btn btn-primary" data-powermail-morestep-validate="{settings.validation.morestep.fieldset}" data-powermail-morestep-show="{iterationPages.cycle}" data-powermail-morestep-previous>&gt;</button>
2020
</f:if>
2121
</div>
2222
</f:if>

Resources/Private/Templates/Form/Form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h3>{form.title}</h3>
3333
<f:if condition="{settings.main.moresteps}">
3434
<div class="btn-group powermail_multistep_navigation" role="group" aria-label="Multistep form page">
3535
<f:for each="{form.pages}" as="page" iteration="iterationPages">
36-
<button class="btn btn-secondary{f:if(condition:iterationPages.isFirst,then:' active')}" type="button" data-powermail-fieldset="{page.uid}" data-powermail-morestep-current="{iterationPages.index}" data-powermail-morestep-show="{iterationPages.index}">{page.title}</button>
36+
<button class="btn btn-secondary{f:if(condition:iterationPages.isFirst,then:' active')}" type="button" data-powermail-morestep-validate="{settings.validation.morestep.fieldset}" data-powermail-fieldset="{page.uid}" data-powermail-morestep-current="{iterationPages.index}" data-powermail-morestep-show="{iterationPages.index}">{page.title}</button>
3737
</f:for>
3838
</div>
3939
</f:if>

0 commit comments

Comments
 (0)