What GravityForms action is GravityPDF hooking into to start generating the pdf?

Greetings,

I am trying to create a “Download PDF” link by dynamically submitting a form (in the background) and generating a pdf (via GravityPDF API). All of their examples use the 'init' hook, whereas I would like to do so based on an event (button click).

Anyone know which hook I should use to start pdf generation? I’ve asked GravityPDF, but all they say is “Bespoke, Bespoke, Bespoke”!

I mean, I certainly “get it” that it’s not in their business model to provide support for Custom Application Development. But honestly, I didn’t think that telling me which hook GravityPDF uses to fire the “create pdf” process was such a heavy question. But maybe it is and I’m just too dense to see it.

Anyone have experience with this?

Thanks.

Hi Preston. This sounds interesting. How will this be different from someone submitting a form and the GravityPDF plugin creating a PDF at that point? Can you explain where it’s different?

Also, have you looked at using the [gravitypdf] shortcode? I was able to generate links using the documentation here: PDF Download Link for Confirmation and Notifications | Gravity PDF

If you share more information about how you need to configure things to work, I’m sure we can figure something out.

Greetings Chris,

Thanks for replying.

My plan was to have the pdf open in a new window instead of and/or in addition to receiving a copy via email. My understanding is that GPDF attaches to the notifications (only?).

Actually, no I had not. The shortcode looks fairly useful, but again (at first glance) it looks as if someone has to go in and add the shortcode. I want all this to happen “automagically”!

I am humbled, good Sir. Recall from this post that I wound up building my own “form navigation” in the right sidebar.

Well, when all the forms are completed, I have another form (final form) that holds all the values from the previous forms (via Easy Passthrough). Because of the additional “Edit” buttons present in the final form due to Easy Passthrough (see pic),

I thought it best to hide the form completely and just present the pdf after submitting.

So what’s currently happening is that

  1. I am currently tracking submitted forms for the current user.
  2. When all forms have an entry, I would present a “Download PDF” button
  3. The user clicks the button and the pdf opens in a new window.

The pdf also needs to go the the client for uploading into DocuSign, but I thought to handle that via notifications.

So i’m a bit torn on the best approach:

  1. I could just use the notifications for the user and change “Download PDF” to “Send me the PDF”, but for some reason, that just feels …weird (at least to me).
  2. I could problematically do it all in the background (again with Download PDF).

That’s pretty much where I am right about now. Hope that makes sense :grinning:

I’d love to hear your thoughts. If you think this is a bad approach do not hesitate to say so, i’m all ears!

Preston

@SleeperTech If you’d like to direct a user to the PDF upon submission of the form, you can do this via setting the confirmation type of the form to Redirect and, for the URL, entering a merge tag in the form of {:pdf:60131ddb91140} where that string of numbers is the ID of the PDF to be generated. This won’t open the PDF in a new window, but will submit the form, generate the PDF, and open the PDF in the same window. Might that work in your situation?

2 Likes

Greetings Joshua,

Thank you for replying.

Wow. That’s a pretty cool feature (I surely missed that in their docs). Kudos!

Honestly, it is soooo close that it gives me almost everything I need …but the same window issue is kind of a jarring user experience (IMHO). Especially to those with “limited” Internet skills. But that shortcode is great for all sorts of other use-cases!

:thinking: I’m thinking because of the secure nature of these pdfs, I might not be able to get there. But that is just a guess :confused:

I’m also thinking it would be easier to simply change the name of the button to “Email me the PDF” and just allowing the default GPDF process of sending the pdf as an attachment to a notification. Not as sexy, but it works!

I’m open to any opinions on this matter.

Thanks Again!

Yeah, not sure it’s in the docs. The merge tag is available via notifications and such, but haven’t seen any actual documentation on it.

Thus, it could be included as a link in a text confirmation on the page. That link in the confirmation should be able to set the download or new window action.

:thinking: hmm, lemme go play with it for a bit. Will report back.

Thanks again!

…more news as it happens!

1 Like