sell pdf file

Formidable Forms
29 April, 2024 14:39:44
AirBelV2
Topics: 2
Messages: 11
Hello, I'm using Forminator for the form. My website works like this: the customer fills in data in a form as the first step, then proceeds to the payment step, and afterwards, they receive the PDF. Everything works fine once the PDF is generated; they can receive it via email or by clicking on a link directly. However, I want the customer to be able to download the PDF only when they log in to my site, but I don't know how to do it. Basically, I want them to have access to their purchased PDF when they log in. Do you have any ideas on how I could proceed?


I want there to be a small dashboard on their customer account where they can see their order and download it. If you know of any plugins that allow this. Because the PDF is unique to each customer, so I'm unable to achieve it with WooCommerce.

thanks for your help,
best regard
30 April, 2024 00:04:00
E2Pdf
Support
Topics: 7
Messages: 3345
Hello,

Unfortunately, Forminator by default doesn't have functionality that allows to output created entries on the frontend. There is a possibility to use the WpDataTables plugin + Forminator and output the PDF download links, but we are not sure if it allows filtering entries submitted by User ID.

You can try to check if it fits your needs and if it's possible to output just entries submitted by your customers when logged in. If yes, there is a way to output the PDF download links in the WpDataTables by following the steps:

1. Create some "hidden" field inside your form. It can be just empty, it will be needed just to add the column to WpDataTables to modify its output.

2. Add a column to output that hidden field to the WpDataTables

3. Add code to your theme functions.php or as a PHP snippet: https://codefile.io/f/nY2kdjS36Y

It must be changed in the code:
- 2845 - to your Forminator Form ID
- hidden-2 - to your added hidden field slug
- 561 - to your E2Pdf Template ID connected to the Forminator Form

P.S. If you find any other 3rd party plugin that can output Forminator Entries on the frontend we will be glad to review its integration to E2Pdf.


We would really appreciate your feedback at WordPress.org!
30 April, 2024 03:54:23
AirBelV2
Topics: 2
Messages: 11
Great, I've succeeded. I'm attaching a screenshot for you. Now, how do I set it up so that each customer can access it by logging in? But only their files, not those of others.
30 April, 2024 04:19:47
E2Pdf
Support
Topics: 7
Messages: 3345
Unfortunately, it's better to contact WpDataTables plugin support so they can let you know the best option (if possible) to filter the entries by user-submitted data. The functionality added to our other customer with provider filters didn't require filtering entries and the question is more related to the WpDataTables plugin functionality.
We would really appreciate your feedback at WordPress.org!
30 April, 2024 13:11:27
AirBelV2
Topics: 2
Messages: 11
okay no problem thanks for your help. And with Gravity Forms, you don't have any solutions either? In any case, could you please send me the PHP code you sent earlier but to use with Gravity Forms instead of Forminator?
1 May, 2024 01:26:46
E2Pdf
Support
Topics: 7
Messages: 3345
Gravity Forms also doesn't have a built-in feature, however, it's possible to use the Gravity View, it can filter entries by Logged in User ID: https://docs.gravitykit.com/article/203-how-to-show-only-results-submitted-by-the-current-user, and custom content field to accomplish the task.

In the custom content, it must be used the shortcode as [e2pdf-download id="1" dataset="{entry_id}"]

We would really appreciate your feedback at WordPress.org!
1 May, 2024 10:52:42
E2Pdf
Support
Topics: 7
Messages: 3345
There is a note on the documents page.

The Advanced Filter section only shows up after installing the Advanced Filter extension. Learn how to Install, Activate, and Update GravityKit Plugins.

If you still have issues with setting up the filter, you need to contact the Gravity Kit staff as it's related to their plugin.
We would really appreciate your feedback at WordPress.org!
1 May, 2024 11:27:25
AirBelV2
Topics: 2
Messages: 11
I just found the problem, it's because I hadn't clicked on the "publish" button on my gravity kit view yet. So since it wasn't published, the filter button wasn't present :)

Anyway, a big thank you for your help, I will try what you told me and see if it works. It's a holiday and you're still here to answer my questions, so I send you a big thank you from France ;)