l want to display a message when a user open a form.
The message will explain the form and if the user clik NO the form close
You can use this script in the docReady event.
if (xfa.host.messageBox("A message goes here to explain the form","Title for the Message Box", 1, 2) != 4) event.target.closeDoc();
Fair warning, I was unable to 'test' this in LC, I had to save the file and open it in Reader to verify it was working.