I opened this feature request and you added it crazy fast (THANKS). The feature looks like it returns a simple list of data, which is very useful.

I think it would be useful if this action returned the submission in the form of the webform_data data type. That way they have access to tokens as well.

Tag1 supports Drupal development!Tag1 logo

Comments

stBorchert’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Status: Active » Needs review

I've changed the return type to list<webform_data> but that didn't change anything (at least I didn't get any tokens for the loaded submissions).
The data returned is created by webform_get_submissions() so its basically the same structure as available after submitting a webform.

that0n3guy’s picture

Looking at webform_rules_rules_invoke_event(), it looks like the structure your sending to rules is way different than what webform_get_submissions() returns. I would guess thats why there is no token support. The data structure isn't the same.

that0n3guy’s picture

Also, return type of list<webform_data> is still a type of "list" isn't it? We want to return webform_data. Right? (I've not spent much time coding for rules...)

stBorchert’s picture

No, the action needs to return a list because you may want to get multiple submissions.

thomas.fleming’s picture

Like stBorchert said, the action needs to return a list because you may want to get multiple submissions. However, the return type needs to be list<webform> since the data type defined in webform_rules_rules_data_info() is webform. Attached is a patch to fix this issue.

thomas.fleming’s picture

FileSize
442 bytes

Like stBorchert said, the action needs to return a list because you may want to get multiple submissions. However, the return type needs to be list<webform> since the data type defined in webform_rules_rules_data_info() is webform. Attached is a patch to fix this issue.

thomas.fleming’s picture

thomas.fleming’s picture

OK, let's try adding that patch one more time :)