Tokens not passing from wizard page 2 to default field value on wizard page 4

Created on 17 July 2025, 13 days ago

Problem/Motivation

I have a webform, that has several wizard pages. On wizard page 1 I have first_name / last_name etc text fields. On page 2 I have more text fields ie business_name (etc).

On wizard page 4 (for example) I have a "Full name" field and use '#default_value': '[webform_submission:values:first_name] [webform_submission:values:last_name]' to pre-polulate this field from the two fields on page 1. That works fine. However, on the same wizard page 4, I have a field for "Business name" that I want to use '#default_value': '[webform_submission:values:business_name]' - but it doesnt' work. It only works if I move the Business name field on to page 1 - anything that's on any pages after page 1, just won't pass to the default values elsewhere.

Steps to reproduce

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇬🇧United Kingdom david.bell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @david.bell
  • For bug reports provide the YAML of a minimal form which demonstrates the bug, and please leave out extra fields.

  • 🇬🇧United Kingdom david.bell

    Thanks cilifen here's a much slimmed down version of the form, with just three wizard pages.

    your_details_page:
      '#type': wizard_page
      '#title': 'Your details'
      your_details_fieldset:
        '#type': fieldset
        '#title': 'Your details'
        '#title_display': before
        first_name:
          '#type': textfield
          '#title': 'First name'
          '#autocomplete': 'off'
          '#required': true
          '#required_error': 'Please enter your first name'
        last_name:
          '#type': textfield
          '#title': 'Last name'
          '#autocomplete': 'off'
          '#required': true
          '#required_error': 'Please enter your last name'
    business_details_page:
      '#type': wizard_page
      '#title': 'Business details'
      business_details_fieldset:
        '#type': fieldset
        '#title': 'Business details'
        '#required': true
        business_name:
          '#type': textfield
          '#title': 'Business name'
          '#autocomplete': 'off'
          '#required': true
          '#required_error': 'Please enter the business name'
    mg11_details:
      '#type': wizard_page
      '#title': 'Confirm details'
      mg11_details_fieldset:
        '#type': fieldset
        '#title': 'Confirm your details'
        '#title display': before
        mg11_your_full_name:
          '#type': textfield
          '#title': 'What is your full name? (first name and surname)'
          '#autocomplete': 'off'
          '#required_error': 'Please enter your first name and surname'
          '#default_value': '[webform_submission:values:first_name] [webform_submission:values:last_name]'
        mg_11name_of_business:
          '#type': textfield
          '#title': 'Name of business'
          '#autocomplete': 'off'
          '#default_value': '[webform_submission:values:business_name]'
    actions:
      '#type': webform_actions
      '#title': 'Submit button(s)'
      '#wizard_prev__label': Back
      '#wizard_next__label': Next
      '#preview_prev__label': Back
      '#preview_next__label': Review
  • 🇬🇧United Kingdom david.bell

    How do tickets/bugs get assigned to someone, only no replies thus far?

  • I replied. Below is the template reply with ways to have your bug prioritized.

  • Another avenue of support is the #webform channel in Drupal Slack .

Production build 0.71.5 2024