


Hello,
I have implemented the sample and it works but I am not sure how to point this to my real DOR.
Any help would be great.
Noelle
Views
Replies
Total Likes
Can you please give some more details of the use case?
Hi,
The sample form has a button that uses the API to produce a "preview" of the DOR with the content of the adaptive form. When I implemented the button on my form it still uses the DOR of the sample form.
Below is the function as you can see the DOR for the sample is hardcoded.
/**
* Get pdf
* @Return {OPTIONS} drop down options
*/
function getPdf()
{
console.log("in view pdf");
window.guideBridge.getDataXML(
{
success: function(result) {
var formData = new FormData();
formData.append("dataXml",result.data);
console.log("got data"+result.data);
var settings ={
"async": true,
"url": "/content/AemFormsSamples/getdor.html",
"method": "POST",
data:{'data':result.data},
}
$.ajax(settings).done(function(response)
{
console.log("got response");
window.open(JSON.parse(response).filePath,'_blank');
})
},
error:function(guideResultObject) {console.log("got error"); },
guideState : null,
boundData : true});
}
Do you have a specific template that you want to merge the data with?
Yes, It is attached my form. What I don't understand is why the sample hard codes the DOR to the sample and doesn't reference the form that it is being called from.
Send me a private message we can do a web session after 10 am PST
I am in the process of updating the sample code to take in the xdp name in the request parameters
that way you can use the code to meet your use case
That would be amazing. Will you post when it is completed?
Thx
Here is the article that would help you in your use case
Views
Replies
Total Likes
@NoelleSmith81 The dor in the sample takes the dor xdp node path from the jsp, you can update the ajax call and send a parameter in the function on the button click that has the form path. you can get this parameter in JSP just like data and that's it.
in form
const='some path'
getPdf(const)
update ajax
function getPdf(formPath)
{
update the jsp as well.