D
D
I am trying to change the name given to a form when it is save from the
default "Form 1" to a field in my form.
I copied code that was posted on this site by Koen Alleman (thank you),
plugged in my forms file names, but the save name is still "Form1"
I entered this code by going through Form Options- Open and Save- Save using
Custom Code- Edit.
If there is anyone who can tell me what I have done wrong I would greatly
appreciate it. Thank you!
Here is my code:
function XDocument::OnSaveRequest(eventObj)
{function XDocument::OnSaveRequest(eventObj)
{
var nodeselname =
XDocument.DOM.selectSingleNode("/my:Intro:myosition/my:last_name_candidate").text
XDocument.UI.SetSaveAsDialogFileName(nodeselname);
XDocument.UI.SetSaveAsDialogLocation("C:\\temp\\");
eventObj.IsCancelled = eventObj.PerformSaveOperation();
XDocument.UI.Alert("Form saved");
eventObj.ReturnStatus = true;
}
// Write the code to be run before saving here.
default "Form 1" to a field in my form.
I copied code that was posted on this site by Koen Alleman (thank you),
plugged in my forms file names, but the save name is still "Form1"
I entered this code by going through Form Options- Open and Save- Save using
Custom Code- Edit.
If there is anyone who can tell me what I have done wrong I would greatly
appreciate it. Thank you!
Here is my code:
function XDocument::OnSaveRequest(eventObj)
{function XDocument::OnSaveRequest(eventObj)
{
var nodeselname =
XDocument.DOM.selectSingleNode("/my:Intro:myosition/my:last_name_candidate").text
XDocument.UI.SetSaveAsDialogFileName(nodeselname);
XDocument.UI.SetSaveAsDialogLocation("C:\\temp\\");
eventObj.IsCancelled = eventObj.PerformSaveOperation();
XDocument.UI.Alert("Form saved");
eventObj.ReturnStatus = true;
}
// Write the code to be run before saving here.