Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
I'm writing a module which is dependant on Webform 3.x
It is just great to have such hooks to work with Webform module, great job!
But im trying to figure out, how could i load a submission with all fields already populated.
In fact, i can get a submission with all submitted values, but no information on fields :
Array
(
[9] => stdClass Object
(
[sid] => 9
[nid] => 21
[submitted] => 1278582764
[remote_addr] => 127.0.0.1
[uid] => 1
[name] => admin
[is_draft] => 0
[data] => Array
(
[1] => Array
(
[value] => Array
(
[0] => John Doe
)
)
[2] => Array
(
[value] => Array
(
[0] => john.doe@gmail.com
)
)
)
)
)
I need the field names : 'Name' and 'Email'.
How should i do?
Comments
Comment #1
quicksketchInformation on the fields is acquired by loading the node and then checking the content of $node->webform['components'].
Comment #2
Ludo.RThank you!
I assume that the keys of this array reprensent the cid?
Comment #3
quicksketchYep, that's right.
Comment #4
quicksketch