Hello everyone,
I’m facing a challenge with dynamically changing the content of a displayed PDF file, and I could really use some assistance.
What I’m aiming for is to allow users to click on a document ID, for example, “2”, and have the corresponding PDF, let’s say “2.pdf”, pop up next to the label.
However, when I try to change the input to select a different PDF, such as “2.pdf”, this occurs:
Despite my efforts, I haven’t been able to resolve this issue. I’ve spent quite some time on it to no avail.
Any guidance or suggestions would be greatly appreciated! Thank you in advance for your help.
Best regards,
Khaled
Here’s the important Part of the Code that would be needed to help me find the solution:
"components": [
{
"label": "PDF Viewer",
"attrs": [
{
"attr": "",
"value": ""
}
],
"content": "<iframe class='pdfViewer' src='1.pdf' style='width: 200px; height: 500px; border: none; border-radius: 10px; background-color: transparent;'></iframe>",
"refreshOnChange": true,
"key": "pdfViewer",
"logic": [
{
"name": "show2",
"trigger": {
"type": "simple",
"simple": {
"show": true,
"when": "documentId",
"eq": "2"
}
},
"actions": [
{
"name": "action2",
"type": "property",
"content": "<iframe class='pdfViewer' src='2.pdf' style='width: 200px; height: 500px; border: none; border-radius: 10px; background-color: transparent;'></iframe>",
"property": {
"label": "Content",
"value": "content",
"type": "string",
"component": "content"
}
}
]
},
],
Blockquote