How to show the updated text from AI field in Formidable Forms to the PDF file

August 21, 2024 11:41:18
Topics: 1
Messages: 2
Hi,
I am wondering how to show the edited text generated by AI in AI field in Formidable Forms to the E2PDF PDF file. When I trigger the action SUBMIT(button) to create the PDF, it shows the original (first-time generated) text in the PDF, not the edited version. Why E2PDF can't register or pull the edited version of the AI generated text?
Can you help me to solve this problem?

Best regards,
August 21, 2024 12:25:03
E2Pdf
Topics: 7
Messages: 3614
Support
Hello,

E2Pdf should output the value that is saved under the Formidable Forms entry.

1. Which value do you see under the saved entry?

2. Can you please clarify how do you edit the field?

3. Do you use [e2pdf-download] or [e2pdf-attachment] shortcode in the "Success Message" / "Mail action"?

We would really appreciate your feedback at WordPress.org!
August 21, 2024 12:31:21
Topics: 1
Messages: 2
Thank you for your fast response!
1. The value is only [12]. That is the ID of the field in Formidable forms.
2. That field (the AI field) doesn't allow editing originally. I created an HTML so the AI field could be editable. Her is the HTML:

<div id="frm_field_[id]_container" class="frm_form_field form-field [required_class][error_class]">
<label for="field_[key]" id="field_[key]_label" class="frm_primary_label">[field_name]
<span class="frm_required" aria-hidden="true">[required_label]</span>
</label>
[input]
<div id="frm_ai_response_[id]" class="frm_ai_response frm_description" contenteditable="true">
[if loading]<div class="frm_ai_loading"></div>[/if loading]
</div>
<input type="hidden" id="hidden_ai_response_[id]" name="hidden_ai_response_[id]" />

[if description]<div class="frm_description" id="frm_desc_field_[key]">[description]</div>[/if description]
[if error]<div class="frm_error" role="alert" id="frm_error_field_[key]">[error]</div>[/if error]
</div>

<script>
document.getElementById("frm_field_[id]_container").addEventListener("input", function() {
// Oppdater den skjulte inputen med innholdet fra contenteditable div
var editedContent = document.getElementById("frm_ai_response_[id]").innerText;
document.getElementById("hidden_ai_response_[id]").value = editedContent;
});
</script>

3. I use [e2pdf-download]
August 21, 2024 12:44:06
E2Pdf
Topics: 7
Messages: 3614
Support
Unfortunately, it's the issue with your code. We just checked it on our side and Formidable Forms doesn't store modified value, we still see the original AI value at the "Formidable" -> "Submissions" page, and exactly that value is shown in the PDF.

It needs to modify the code to store the edited value by the Formidable Forms so you can see it at saved submission by Formidable Forms, and in this case, E2Pdf should output the correct value.

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.