Display a repeater field

Formidable Forms
4 December, 2023 03:12:00
Gderon
Topics: 4
Messages: 20
Hello,
I'm having trouble displaying the contents of a repeater field in a PDF.
I use Formidable Forms to store information in meta fields. And I use E2PDf so that customers can generate their PDF files.

Basically, the form asks the customer if he has children, and if so, in the repeater, he indicates the child's first and last name (text fields) and age (Minor - Major button).

I'd like to be able to display the list of children (first name, last name, age) in the PDF.

Can you help?

Translated with www.DeepL.com/Translator (free version)
4 December, 2023 03:14:55
E2Pdf
Support
Topics: 7
Messages: 3163
Hello,

See please possibilities to output repeater data: https://e2pdf.com/docs/extensions/formidable-forms#repeater
We would really appreciate your feedback at WordPress.org!
11 December, 2023 02:50:04
Gderon
Topics: 4
Messages: 20
Hi,

I've read that, but it doesn't work.

Using Formidable field ids doesn't work.
11 December, 2023 02:57:28
Gderon
Topics: 4
Messages: 20
More info:

Repeater ID: [165]
Child first name ID: [1075]
Child Last Name ID: [1076]
Child age ID: [168]

I try this shortcode on template:

[foreach 165][1075] [1076], [168]
[/foreach]

But on the pdf, the shortcode is displayed instead of the children's information.
11 December, 2023 03:48:15
E2Pdf
Support
Topics: 7
Messages: 3163
Hello,

Can you check please the "Value" shown via "Right Mouse Click" -> "Properties" -> "Value"?

If you see there malformed shortcodes, replace the value directly there. Also, we recommend to check Disable WYSIWYG Editor option: https://e2pdf.com/docs/elements/html#value
We would really appreciate your feedback at WordPress.org!
11 December, 2023 04:23:55
Gderon
Topics: 4
Messages: 20
The "value" is what I wrote above.
And with Disable Wysiwyg checked, same result: the PDF shows the shortcode
11 December, 2023 05:19:49
E2Pdf
Support
Topics: 7
Messages: 3163
Can you please clarify, what is the connection of your E2Pdf Template? Is it connected to the Formidable Forms Extension and Form item?
We would really appreciate your feedback at WordPress.org!
11 December, 2023 06:21:03
Gderon
Topics: 4
Messages: 20
The E2PDF template is not directly connected to Formidable Forms.

I use Formidable Forms for users to create their accounts and folders (in Custom Post). The information is stored in the custom post meta.

I then use E2PDF to generate various work files for the users. E2PDF templates fetch information from custom post metas using shortcodes such as: [e2pdf-wp key="my-key"].
This works perfectly, except for repeaters.
11 December, 2023 06:24:06
E2Pdf
Support
Topics: 7
Messages: 3163
In this case [foreach] shortcodes will not work, as it's related to the Formidable Forms Extension and its Instance, and the page doesn't have access to entry data by default.

Is your repeater data stored in the WordPress page meta? If so, what's the output of such data, when it's used simple shortcode: [e2pdf-wp key="my-key" meta="true"]?
We would really appreciate your feedback at WordPress.org!
11 December, 2023 06:42:04
Gderon
Topics: 4
Messages: 20
The repeater data are stored in the meta ( see attch pic).

But the shortcode [e2pdf-wp key="my-key" meta="true"] gives nothing on the PDF.
11 December, 2023 07:17:31
E2Pdf
Support
Topics: 7
Messages: 3163
E2Pdf Template connected to the WordPress post doesn't have access to the Formidable Forms Entry ID.

The problem also is that Formidable Forms can't create metadata from the repeater fields and do not store any Entry ID identifiers to the created post.

The only connection is stored in Formidable Forms Entry and E2Pdf doesn't have any reverse connection possibility.

The only way is to prepare your code, which will find the Formidable Forms Entry ID and will generate output for your repeater data from the Formidable Forms Entry directly.

For example:

Shortcode inside E2Pdf Template:

[e2pdf-wp key="ff_repeatable_data"]

And the code to filter output: https://codefile.io/f/JKdAyCGQIw. It will require code to search Formidable Forms Entry ID by post_id, get the repeater field value, and generate the required output.

We would really appreciate your feedback at WordPress.org!
11 December, 2023 07:27:28
Gderon
Topics: 4
Messages: 20
It all sounds very complex. Wouldn't it be easier to connect the E2PDF template with the Formidable forms? I'd have to change all the template's shortcodes, but if it means I can display the repeater, I'm willing to make any sacrifice :-)
11 December, 2023 07:29:52
Gderon
Topics: 4
Messages: 20
By the way, I did not found in your documentation how use the "Merged Items", to use 2 forms data in 1 PDF... I need this to display the customer information in header/footer of the PDF.
Could you provide me a link to the appropriate documentation?
11 December, 2023 07:32:05
E2Pdf
Support
Topics: 7
Messages: 3163
It depends on your requirements.

If you need to output the PDF on the "Success Message" or inside Formidable Forms View, placed on the page - yes, it could work. We recommend duplicating the E2Pdf Template and making changes, in case it will not fit your needs you can get back to the solution with PHP coding.

As for Merged Items - it's designed to merge 2 Formidable Forms Entries and usually require a 3rd form that will have the possibility to choose required entries. However, if you need to output user data - it can be used User ID field inside Formidable Forms or [e2pdf-user] shortcode, as it's global.
We would really appreciate your feedback at WordPress.org!