Hello,
I'm trying to create a script that would show a alertbox reminding the user that he must join needed files to the email before sending it. But this message must only be shown if a specific subform is visible, if it is not, than it must tranfer to the email directly.
I'm using the Lc subit by email button that is standard in Lc ES2 and I've been meddling around and I can't find a script for my probleme. I've used the general alertapp. but I really need the message to appear only if my subform is visible.. Hoping someone can help me with this. Thanks in advance for all your help.
Melanie
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
you can use a script in the preSubmit event of your Mail button.
It will check the visibility of you subform and prompt a message if it is visible.
form1.#subform[0].EmailSubmitButton1::preSubmit:form - (JavaScript, client)
if (Subform1.presence == "visible") {
// Show a warning message
xfa.host.messageBox("STOP");
// Cancel the submit process
xfa.event.cancelAction = true;
}
Views
Replies
Total Likes
Hi,
you can use a script in the preSubmit event of your Mail button.
It will check the visibility of you subform and prompt a message if it is visible.
form1.#subform[0].EmailSubmitButton1::preSubmit:form - (JavaScript, client)
if (Subform1.presence == "visible") {
// Show a warning message
xfa.host.messageBox("STOP");
// Cancel the submit process
xfa.event.cancelAction = true;
}
Views
Replies
Total Likes
Thank you so much for your help! It works great!! Had only to place it in the subform cauz for some reason, on the submit button it didn't wanna work..
Thanks again for you quick help!!
Views
Likes
Replies
Views
Likes
Replies