Get form path or URL

K

kookie

Is there a way to display the path or URL to the form? I am using the forms
to display content. the output changes from time to time. not all viewers
have rights to edit content. So creating a change request process I need a
way to refer to this form easily for the viewer. If i could generate a field
that writes or displays the URL of the form I could capture this in my
request. this would be easier for the writers to find the form to make the
changes.

I am not commited to this setup. I am open if there is another way to
accomplish this.
 
K

kookie

here is the result:

var strURI = XDocument.Solution.URI; //template path
var strFormLib = strURI.substr(0, strURI.indexOf("Forms/template.xsn")); //
remove this from path
var strFormName = XDocument.URI // file path URL

var strURL = XDocument.DOM.selectSingleNode("/my:myFields/my:URL");
//strURL.text = strFormLib + "/" + strFormName;
strURL.text = strFormName;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top