Skip navigation
melbnc11
Currently Being Moderated

Alertbox on submit email if a subform is visible

Jul 10, 2012 6:28 AM

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

 
Replies
  • Currently Being Moderated
    Jul 10, 2012 10:23 AM   in reply to melbnc11

    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;
    }
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points