- Issue created by @clemorphy
- π¬π§United Kingdom aaron.ferris
Can confirm this, seems we fallback to the default webform settings should a 'per page' wizard next/previous label not be defined.
From a quick look, we could possibly add another condition in WebformSubmissionForm that uses the following order:
1. Per page wizard settings as a priority
2. Then Per webform settings
3. Then fallback to default settings - Merge request !506Issue #3468142: fallback to per webform next/prev labels should per page not be configured β (Merged) created by aaron.ferris
- Status changed to Needs review
about 1 year ago 4:58pm 14 August 2024 - π«π·France clemorphy Paris
Thanks a lot aaron.ferris
I have tested your MR from #3, applied on version 6.2.7, and it works perfectly for me. - Status changed to Needs work
about 1 year ago 1:37pm 19 August 2024 - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
It looks like $next_button_custom is not getting set. That needs to be fixed. This also needs tests.
- π¬π§United Kingdom aaron.ferris
Ah yes, ive fixed that - id need more time to look at writing a test.
- π«π·France clemorphy Paris
Ah yes, ive fixed that - id need more time to look at writing a test.
I confirm that the error is gone with the updated MR!506
Thank you. - π¦πΊAustralia darvanen Sydney, Australia
The button label doesn't get overridden *there*, but it does get overridden in \Drupal\webform\Element\WebformActions::processWebformActions
// Apply custom label. $has_custom_label = !empty($element[$button_name]['#webform_actions_button_custom']); if (!empty($element['#' . $settings_name . '__label']) && !$has_custom_label) { if (isset($element[$button_name]['#type']) && ($element[$button_name]['#type'] === 'link')) { $element[$button_name]['#title'] = $element['#' . $settings_name . '__label']; } else { $element[$button_name]['#value'] = $element['#' . $settings_name . '__label']; } }
- First commit to issue fork.
- πΊπΈUnited States jrockowitz Brooklyn, NY
Let's see if the tests pass with 6.3.x and decide if additional test coverage is needed.
- πΊπΈUnited States jrockowitz Brooklyn, NY
Below are my review steps
- Install webform_examples module (/admin/modules)
- Goto Example: Wizard (/form/example-wizard)
- Set the Wizard button label to {prev} and {next} (/admin/structure/webform/manage/example_wizard/settings/form)
- Confirm that labels are NOT applied.
- Switch to the MR
- Confirm that labels are applied.
- πΊπΈUnited States jrockowitz Brooklyn, NY
Yep, I am not seeing any test coverage and here is where I think we need to add some \Drupal\Tests\webform\Functional\Wizard\WebformWizardAdvancedTest
-
jrockowitz β
committed d6f7a56e on 6.3.x authored by
aaron.ferris β
[#3468142] feat: Wizard previous and next label not overridden By:...
-
jrockowitz β
committed d6f7a56e on 6.3.x authored by
aaron.ferris β
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.