Drupal 8 webform 8.x-5.8 - how to show the previous step value in next step? I have created a multistep webform and it has 5 steps. is it possible to get the previous step field value/data in the next step?
for example, I have a field select list field (key = select_your_data_type) in step 4 and on step 5 show the selected field value?
Use

HOOK_form_alter(array $form,FormStateInterface $form_state, $form_id)


check if $form_id equals your specific form (form's machine name) and validate if current page is page where you want to display data ('step_5' is wizard's page machine_name).

if ($form['progress']['#current_page'] === 'step_5')


get values from $form_state

$form_state-&gt;getValue('select_your_data_type')


and you can set form elements via

$form['elements']['page_5']['field_i_want_to_set_in_page_5']


or via

$form_state-&gt;set('field_i_want_to_set_in_page_5', $my_value);


or course do not forget to print field_i_want_to_set_in_page_5 somewhere on page 5.