I'm using Fill PDF and it works fine using system tokens (i.e. current user, current page....). When I try to set webforms tokens (to mapping fields) the pdf template is not filled. I'm using PHP/javabridge PDF filling service. I can't understand the problem could be related to.

Thank in advance.

CommentFileSizeAuthor
#2 webform_tokens.png51.99 KBMiao1994

Comments

liam morland’s picture

On the "Edit field mapping for ..." page, is there a Webform section in the Tokens list?

Miao1994’s picture

StatusFileSize
new51.99 KB

Yes, it is. I can fill "value" field by clicking on token.

liam morland’s picture

Please check that you are using the latest releases of Webform, Webform Tokens, and Fill PDF.

Miao1994’s picture

Thanks for your help, Liam.
All modules are the latest release (7.x-3.18, 7.x-1.1, 7.x-1.5). I confirm that Fill PDF works for all tokens except webform tokens. Drupal Logs don't report any error.

wizonesolutions’s picture

Project: Webform Tokens » FillPDF
Version: 7.x-1.1 » 7.x-1.x-dev
Component: Miscellaneous » Code

Try the development release of Fill PDF (moving to that). Fill PDF is the module that does the replacement; if you see the tokens, then Webform Tokens is working fine.

Can you also post your Fill PDF Link? In the past there have been some issues when passing multiple submission IDs (though those should be fixed).

Miao1994’s picture

I saw the last Fill PDF release 7.x-1.6, so first I tried to update my current version 7.x-1.5 using update manager. After updating (database too) module stop working showing the message:

Fatal error: Call to undefined function rules_invoke_event() in ......./drupal/sites/all/modules/fillpdf/fillpdf.module on line 621

Message is showed clicking on the PDF link. Link is set in Webform-->form settings-->custom URL:/fillpdf?fid=470&nid=10&download=1.

wizonesolutions’s picture

Apply the patch from #1266174-10: Rules integration. Sorry. Let me know if that works (apply it to -dev), along with everything else, and I'll do another release.

wizonesolutions’s picture

Version: 7.x-1.x-dev » 7.x-1.7
Status: Active » Postponed (maintainer needs more info)

Released 7.x-1.7 which also fixes this. Try that.

Miao1994’s picture

7.x-1.7 fixed the issue, now Fill PDF works fine again, thank you.
Regarding webform tokens , as you suggested, my problem was related to the link used. I switched to PHP:

echo l("Download your PDF", fillpdf_pdf_link($form_id = 431, null, $webform = array('nid'=>95))); 

Where I put the webform content nid (95) without sid to use the latest submission. Now PDF is filled with the correct value corresponding to the last sid submission, but I get the notice:

Undefined index: sid in fillpdf_pdf_link() (line 156 of ......../drupal/sites/all/modules/fillpdf/fillpdf.module).

Is there a way to fix this notice?

Thanks in advance

Miao1994’s picture

Finally a HTML link like this: /fillpdf?fid=431&webforms[0][nid]=95&download=1 works for me without any issues. All tokens and webform tokens in Fill PDF are working (I set tokens in field title and custom path).
Thanks for your help.

liam morland’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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