I expect that in most cases, a given PDF used with Webform always draws its data from the same Webform node. So, I suggest that on the "Edit PDF form" page, there should be a preference where one can set the default node from which to draw form data. For example, if one visited a URL like fillpdf?fid=1, it would use that default node.
This would allow a custom module to hook into this to more easily provide links to the filled version of the form. It could add to each Webform links to the filled versions of PDFs that refer to that Webform. There could be other ways of automating link generation which would benefit from this.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | fillpdf_1393012_default_nid.patch | 5.9 KB | liam morland |
| #5 | fillpdf_1393012_default_nid.patch | 4.98 KB | liam morland |
| #3 | fillpdf_1393012_default_nid.patch | 4.99 KB | liam morland |
| #1 | fillpdf_1393012_default_nid.patch | 5.09 KB | liam morland |
Comments
Comment #1
liam morlandPatch implementing this attached. It does two things:
This patch incorporates the fix for #1356304: Webform query broken when no sid given because it changes that area of code and depends on that fix having been made.
Comment #2
wizonesolutionsCan you re-roll this without #1356304: Webform query broken when no sid given since it is now committed?
Other than that, I approve of the way you did this and am willing to add this function, especially since many PDF forms *are* linked to a specific Webform (nid). I'll commit it once you re-roll.
Comment #3
liam morlandThanks. Attached is a re-rolled patch.
Comment #4
wizonesolutionsSome comments on this for whichever one of us gets to them first.
Call this "Default Node ID".
"in the Fill PDF URL"
Maybe this is overdoing it, unless Postgres and MySQL both have int(10) as a default. If that's the case, I'm fine with it.
Can you fix the comment here to the revised one? You can see it in the first subtracted line in this block.
Can you also make this query consistent (DESC vs. desc)? Used to be like that anyway.
Comment #5
liam morlandI think I got the maxlength 10 from somewhere else that referenced node IDs.
Updated patch with other changes attached.
Comment #6
wizonesolutionsTested this with a node and webform, and it looks like it works fine. Committed. When you re-roll #1404354: Fill PDF settings: Hide Configure fillpdf-service.com when not in use, I will cut a new official release.
Needs backport.
Comment #7
liam morlandD6 version attached. Apply after #1430390: Coding standards: remove whitespace.
Comment #8
wizonesolutionsLooks good overall. Almost there, but:
I think this snuck in here. Can you re-roll without this?
Comment #9
liam morlandIt's in the D7 version of the patch.
Comment #13
liam morlandDrupal 6 is no longer supported.