This is related/ could be a repeat to the webform2pdf issue Download PDF not working for multiple submissions at once.

I can get webform tokens to render in individual sid downloads but not with multiple downloads. I would really like to get this fixed since I can not revert back to 7.x-3.18.

Anybody know how the makeup of CID in webform 7.x-alpha4 would effect the webform2pdf module?

I have even gone as far as to have the similar sites set up with both version 4 and 3 webforms setup and having the webform2pdf module work fine with version 3.18 of webform but not 4alpha4.

I am sorry if this is not related to the Webform module but any advice will help

Comments

quicksketch’s picture

I don't understand this request. Which tokens are you referring to ([submission:sid] or...?) and in which fields are you trying to use these tokens? Webform2PDF (and other modules) will almost certainly need to be branched for support for the 4.x version of Webform now or at some point in the near future and it wouldn't surprise me if changes to the project were needed for 4.x support. After all the change in APIs is exactly why we made a 4.x version in the first place.

fullrobust’s picture

Title: SID and CID Database difference between 7.x-4.0 and 7.x-3.18 changing contrib modules » Webform 7.x-4 updated api
Version: 7.x-4.0-alpha4 » 7.x-4.0-alpha6

Actually all values work except the [submission:values:?] tokens.

As far as I can tell the api has not changed that much. The only fields I am using are text area but have tried several others and they do not render clearly either.

Is there a new function that should be added?

I have pinpointed the rendering issue within a certain function of the webform2pdf module but do not know where to go.

quicksketch’s picture

Project: Webform » Webform2PDF
Version: 7.x-4.0-alpha6 » 7.x-3.x-dev
Category: bug » feature

They probably simply need to pass the $submission variable into _webform_filter_tokens(). If the $submission variable isn't available, the tokens obviously won't be available. If things like [submission:sid] are working but [submission:values:?] are not, maybe the $submission->values array is empty. Let's move this over to Webform2PDF since it sounds like an implementation shortcoming.

fullrobust’s picture

FIXED, in the file webform2pdf.module find the line below in the function _webform2pdf_get_submissions

$submissions[$row->sid]->data[$row->cid]['value'][$row->no] = $row->data;

Remove ['value'] so the line reads

$submissions[$row->sid]->data[$row->cid][$row->no] = $row->data;

Do not know how to submit a patch but solved.

quicksketch’s picture

Thanks @stangln, that's an API changed documented here: http://drupal.org/node/1609324.

Ideally webform2pdf would use Webform's own webform_get_submissions() function to pull in the submissions so the difference in structure wouldn't be a problem.

pdcrane’s picture

Has #4 been implemented?

pdcrane’s picture

Just a quick note for those using webform2pdf with the 4.x-alpha branch of webforms

We've been using stangln's #4 on a site for some time now. I can confirm that it fixes the issue when interacting with the 4.x-alpha branch of webform. And as of version alpha6 we have no known compatibility issues.

psorto’s picture

Is there anyway to add a "accept" or "rejected" checkbox on the results page?

sonicthoughts’s picture

Does someone know if #4 will be / is committed?

josebrito’s picture

The solution from stangln on #4 works ok.
What we need to do to include in a release? Is a patch?

mr.york’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Issue summary: View changes
Status: Active » Fixed

Thank you.
I've commited hotfix in 7.x-4.x branch.

Status: Fixed » Closed (fixed)

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

prakashsingh’s picture

Version: 7.x-4.x-dev » 7.x-3.x-dev
Status: Closed (fixed) » Active

I am using 3.x version

In my case, when i try to generate PDF for more than one submission the values of the first submission get copied to all PDF pages.

Any help..

mr.york’s picture

Status: Active » Closed (works as designed)

The webform2pdf 3.x not suported webform 4.x module.

karibou-mtl’s picture

Hi !

When I want download pdf, I have an error message. (Error loading pdf)
I work with

webform last version and webform2pdf last version to.

Any Idea ?

I change my tcpdf librairie for the last version.