Here is my script for a email button1 which execute a invisible one(see below) and hides a Subform(form1.HR_USE.Hide_HR):
var flag = false;
while
(flag != true){
var CheckPW = xfa.host.response("Password required", "Comments", "", 0);
if (CheckPW == "123"){
form1.HR_USE.Hide_HR.presence="hidden";
form1.HR_USE.Hide_HR.Mail_Staffing.execEvent("click");
flag = true;
} else {
if (CheckPW == ""){
flag = true;
} else {
xfa.host.messageBox("Wrong Password, please try again!", "",0,0);
}
}
}
Here is my script for invisible email button2:
var
myDoc = event.target;
var
address = "xxx@xxx.org";
var
sub = "Form ";
var Sender =(form1.Page1.New_Hire.Group_B.EmployeeInfo.RowA.PositionTitle.rawValue+" - "+form1.Page1.MANAGER_APRO.HiringManagerName.rawValue);
var msgBody = "See my Form attached.\n\nThank You!";
myDoc.mailDoc({ bUI: false,
cTo: address,
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n",
cSubmitAs: "PDF"});
Also for the email button2 for a PostSubmit event I have the script:
form1.HR_USE.Hide_HR.presence="visible";
Everything works fine, I am able to email the form but the postsubmit script does not work!!
I like the subform: form1.HR_USE.Hide_HR to became again visible
Where I am wrong?
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
I haven't used the postSubmit event, but I'm thinking it may be because the button you are using isn't using the built-in submit functionality.
What happens if you put the line at the end of you submission script?
var myDoc = event.target;
var address = "xxx@xxx.org";
varsub = "Form ";
var Sender =(form1.Page1.New_Hire.Group_B.EmployeeInfo.RowA.PositionTitle.rawValue+" - "+form1.Page1.MANAGER_APRO.HiringManagerName.rawValue);
var msgBody = "See my Form attached.\n\nThank You!";
myDoc.mailDoc({ bUI: false,
cTo: address,
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n",
cSubmitAs: "PDF"});
form1.HR_USE.Hide_HR.presence="visible";
Views
Replies
Total Likes
I haven't used the postSubmit event, but I'm thinking it may be because the button you are using isn't using the built-in submit functionality.
What happens if you put the line at the end of you submission script?
var myDoc = event.target;
var address = "xxx@xxx.org";
varsub = "Form ";
var Sender =(form1.Page1.New_Hire.Group_B.EmployeeInfo.RowA.PositionTitle.rawValue+" - "+form1.Page1.MANAGER_APRO.HiringManagerName.rawValue);
var msgBody = "See my Form attached.\n\nThank You!";
myDoc.mailDoc({ bUI: false,
cTo: address,
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n",
cSubmitAs: "PDF"});
form1.HR_USE.Hide_HR.presence="visible";
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies