Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Getting a value depending of the type of document rendered.

Avatar

Former Community Member
I'm trying to make a sending button visible or invisible depending of the kind of document rendered. If the document is a PDF the button would be hidden, or shown if the document is a PDForm.



Is there an attribute or something I could get in a script that contents the kind of document rendered?



Thanks in advance.
2 Replies

Avatar

Level 6
If you are merging data with your form when you render it, you could include the FormPreference parameter (PDF or PDFForm) in the data, then check that value on the initialize event of the form. Based on the value, you can hide or show the buttons. There's probably another way, but nothing springs to mind.



You'll probably have better luck posting your question in the LiveCycle Forms forum.



Jared Langdon

www.jlangdon.ca

Avatar

Former Community Member
Hi Jared, thanks for answering.



I'm doing exactly that. The question now is, how do I refer the FormPreference parameter in a javascript on designer?



I suppose I could add a XML tag on the data with a value to show or hide the button, but if I find a way to do it without adding anything on the XML will be more elegant, and less work to do for programmers.



Juan Cruz.