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

quicksketch’s picture

Information on the fields is acquired by loading the node and then checking the content of $node->webform['components'].

Ludo.R’s picture

Thank you!

I assume that the keys of this array reprensent the cid?

quicksketch’s picture

I assume that the keys of this array reprensent the cid?

Yep, that's right.

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.