Pass E2PDF Shortcode Value to Form Field

Formidable Forms
June 03, 2022 10:31:28
MC
Topics: 8
Messages: 15
Strange use case:

In a Formidable View, click a link to pass E2PDF shortcode for the selected record as a URL variable to a text field in a form so that the text input in the form gets the full path to the selected record's %uid% using the get param or frm set get param:

text input receives via Formidable default field value [get param=' '], as: https://whatever-is-in-e2pdf-url-settings.com/efcb9262x5cbef97403f1077986b2s22

How can I make that happen? nay help is greatly appreciated, as always :)
June 03, 2022 10:32:39
MC
Topics: 8
Messages: 15
*any help, not "nay" :/
June 03, 2022 11:08:58
E2Pdf
Topics: 7
Messages: 3614
Support
Hi,

Unfortunately there is no easy way to accomplish. In theory it must be built some custom ajax request which will be connected to the link. When ajax will be fired it must be generated shortcode via PHP as:

$url = do_shortcode('[e2pdf-download id="1" dataset="123" output="url" esc_url_raw="true"]');

* where "1" is the Template ID and "123" Entry ID (must be dynamic).

After you get URL you will need to update Formidable Forms Entry via PHP.

P.S. If you need to output just PDF download in backend when you "View" or "Edit" Entry - there is much more easier way so if you need just this - let us know please and we will share a code snippet.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
June 03, 2022 11:14:15
MC
Topics: 8
Messages: 15
Thank you for the reply. I am interested in the code snippet. Can you share that with me?
June 03, 2022 11:18:30
E2Pdf
Topics: 7
Messages: 3614
Support
It must be added to functions.php or as PHP Snippet: https://codeshare.io/RbeAjj

It must be changed:
"22" - to your Form ID
"1" (inside shortcode) - to your E2Pdf Template ID for that form.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.