I'm using Webform, Fieldgroup and Multistep with D7.

Ultimately I'd like to create a hierarchically-grouped list of all the submitted values and display on the last step of the multi-step form, with the following format:

  • Page 1
    • Question 1 Label
      • Question 1 Response
    • Question 2 Label
      • Question 2 Response
    • Question 3 Label
      • Question 3 Response
  • Page 2
    • Question 4 Label
      • Question 4 Response
    • Question 5 Label
      • Question 5 Response
    • Question 6 Label
      • Question 6 Response

When I inspect the $form object, however, I see the fields each listed, but $form['field_my_question']['und'][0]['#field_parents'] is an empty array.

How can I identify from the $form object which fields belong on which page of my multistep form?


I don't know what exactly #field_parents is for, but the information about field grouping is in $form (which, it turns out, is an array, not an object) several times over, in $form['#groups'], $form['#fieldgroups'], and $form['#group-children'].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.