Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Generating html page using FormAPI
windy
I have a requirement to enable users to generate an output file (html) when they click the save button on the dct.
I have the following code so far....
[PHP]
// File test.js
function init(){
// Register a function to handle Save.
IWEventRegistry.addFormHandler("onSaveDone", saveDone);
}
function saveDone(){
var result;
var dcrName = IWDCRInfo.getDCRName();
//result = message(dcrname);
var tplName = IWPageGeneration.getValidPresentationTemplates();
//result = message(tplName);
var pageName = dcrName +="\n.html";
boolean IWPageGeneration.setPresentationTemplate(tplName);
var page IWPageGeneration.setOutoutFile(pageName, "Y:\default\main\Test\WORKAREA\content");
return result;
}
// Call the init routine onLoad
IWEventRegistry.addFormHandler("onFormInit", init);
[/PHP]
So far I have been able to get and set the value of the output file name and get the value of the presentation template.
However, the documentation is not clear about how to use the presentation template to generate the output file.
Would appreciate any help, tips - thanks
Find more posts tagged with
Comments
nipper
Do some searching, this is a common (and often bad) request. There is an active thread in the Forms Publisher section about it. You can do it, but it is a bad idea. This should be done in workflow rather than in FormAPI
windy
Thanks Nipper. I will eventually do this in a workflow, but need to do this from with FormApi for this iteration of the dev/test process.