Hi Adobe Engineers,
We have a use case where XDP template is used to render the form as HTML. This form contains the HTML submit button. The user accesses this form from an URL, fills the data and clicks the HTML submit button. The outputService.generatePDFOutput() method is used to generate a flat PDF and it is sent to the client browser. The HTTP submit button is not visible in the flat PDF since its field property is set to 'visible (screen only)' . But if this same form is saved as interactive PDF using formsService.renderPDFForm() method then the HTTP submit button is present in the output interactive PDF.
What needs to be done differently to generate interactive forms without the presence of HTTP submit button?
Thanks is advance for the response.
Some questions for clarity will help in understanding the use case better 🙂
- If I understood correct, you created an XDP form (using Designer?) and then you are rendering the XDP form as HTML, how are you doing that?
- Also, how are you handling form submission? Are you using custom submit handler on AEM Forms OSGi?
- Finally, why do you not want the Submit button on the interactive PDF, don't you want the user to Submit the PDF form?
I can replicate the issue in-house.
The HTTP button is visible in the output PDF with Forms service invocation irrespective of the presence set for the button while we see the expected output PDF with the Output service.
To unblock your work, you can hide or show the button by changing the presence values at run time based on the use case. More information here- https://help.adobe.com/en_US/AEMForms/6.1/DesignerScriptingBasics/WS92d06802c76abadb57cc1b6e12a92343...
Hope this helps!
Hi Pulkit & Nikhil,
Thanks for the quick response.
Pulkit, on replicating the issue and solving it, what event in designer was used to hide the HTML button or regular button, when it's presence was already set to 'Visible (screen Only)'? I tried the scripts in 'Scripting the presence values for buttons' section in the link you had provided and it did not work for me. Why is this below script not sufficient to hide the button in the saved interactive form.
xfa.form.form1.Subform1.Button1.presence="hidden"; xfa.form.form1.Subform1.Button1.relevant = "-print";
Is there a reason why the button's 'Visible (screen Only)' property is working for outputService.generatePDFOutput() and not working for formsService.renderPDFForm()?
Nikhil, regarding use case, the generated flat PDF is sent to the client, and the interactive PDF is saved in the server file system for further processing. We are using custom code to render the XDP template as HTML form using a specific URL. It is not an adaptive form. The submission handler processes the submitted form.