I'm porting a webform from webforms 3.0 to 4.0 on a new Drupal installation. I have a module that intercepts a webform and does some stuff, and it expects to get the webform data on $form_state["values"]['submitted_tree'], as happened on 3.0.
However, $form_state["values"]['submitted_tree'] seems to be gone.
There is still $form_state["values"]['submitted'] but it has no keys, $form_state["values"]['details'] but it has no useful data and $form_state["values"]['submit'] that seems to have some random keys.
Cans somebody help me with this? Thanks!
Comments
Comment #1
quicksketchIn order to increase consistency in our data structures, we eliminated $form_state['values']['submitted_tree']. Now $form_state['values'] matches $submission->data really quite closely, making it so we can share API functions for them. It also eliminates some recursion in the code, and uses less memory if we're not keeping two copies of the same data in different structures. In truth I don't think we used 'submitted_tree' in the 3.x branch, it was there for compatibility with the *2.x* branch, over 6 years ago.
So in order to use the 4.x branch, your code will need to be updated.
Comment #2
quicksketchComment #3
danchadwick commentedReopening so that this issue can be documented on the webform 3.x to 4.x upgrade page. (I didn't know in which version this change was made, so I didn't edit the documentation page myself.)
Comment #4
danchadwick commentedComment #5
quicksketchThanks, this is actually the same change set as the $submission->values structure changing, so I've just extended the current entry at https://drupal.org/node/1609324#submission-structure.