Fields Disappearing On Download Links

Formidable Forms Bug Released
29 March, 2022 14:48:51
tgrosk
Topics: 1
Messages: 8
When I complete my form, the shortcode allows me to download the PDF as it should be completed. I have a dashboard on my website to download previously filled out forms and the section of the PDF that uses a repeater in Formidable Forms is empty.

The shortcode that is used when downloading the form after completing the form is: [e2pdf-download id="3"]

The shortcode that is used when downloading the form from the dashboard is: [e2pdf-download id="3" dataset="'. $result->itemKey .'" class="button"]

I am querying the Form ID using MySQL with: $result->itemKey
29 March, 2022 23:28:11
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

The "dataset" attribute assigned to shortcode must be the Entry ID and not the Form Key / Form ID so you need to rebuild the code to assign it correctly so E2Pdf can know for which entry it must generate PDF download link.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
30 March, 2022 06:20:08
tgrosk
Topics: 1
Messages: 8
My apologies. I am getting the Entry ID with the MySQL query. What else can I check to troubleshoot this?
30 March, 2022 06:22:03
tgrosk
Topics: 1
Messages: 8
I am querying the item_key within the wp_frm_items table to get that value through my PHP loop. I believe that this is the Entry ID that is required for the "dataset."
30 March, 2022 06:33:45
tgrosk
Topics: 1
Messages: 8
It seems like the issue is with the area where I am using a repeater in Formidable Forms. It works properly when I use this shortcode that is part of the form completion text: [e2pdf-download id="3"], but the Formidable Forms repeater isn't displaying properly on the dashboard when I use the [e2pdf-download id="3" dataset="'. $result->itemKey .'" class="button"] shortcode. I don't think its a field mapping issue because the information is showing properly in one download link but not the other.
30 March, 2022 06:50:21
E2Pdf
Support
Topics: 7
Messages: 3163
item_key - is the Entry Key but not Entry ID.

Can you try to modify the code to get "id" instead of "item_key"?

If it still will not work can you please post the full code which gets the data from MySQL?


We would really appreciate your feedback at WordPress.org!
30 March, 2022 08:44:43
E2Pdf
Support
Topics: 7
Messages: 3163
You need to rebuild the code to use Entry ID instead of Entry Key as "dataset". Repeater data doesn't appear inside PDF exactly by this reason.

P.S. We will release a fix in nearest time to avoid incorrect usage or will extend usage with item_key correctly however at this moment you need just to correct the code to use Entry ID.
We would really appreciate your feedback at WordPress.org!
30 March, 2022 09:17:02
tgrosk
Topics: 1
Messages: 8
Ok. Currently, that would be the column labeled "id" in the wp_frm_items, correct?
30 March, 2022 09:25:46
E2Pdf
Support
Topics: 7
Messages: 3163
Replace:

mv5.item_key AS 'itemKey'

to

mv5.item_key AS 'itemKey',
mv5.id AS 'itemDataset'

AND

echo do_shortcode('[e2pdf-download id="3" dataset="'. $result->itemKey .'" class="button"]');

to

echo do_shortcode('[e2pdf-download id="3" dataset="'. $result->itemDataset .'" class="button"]');
We would really appreciate your feedback at WordPress.org!
30 March, 2022 11:33:15
tgrosk
Topics: 1
Messages: 8
Wonderful! This seems to have solved the issue. I appreciate your assistance with this.