Expand my Community achievements bar.

Forcing the user to save before submit.

Avatar

Former Community Member

Hi,

I need to force the user to save the form before submit.

How can I do that ? Please help.

3 Replies

Avatar

Level 10

Hi,

You can use the dirty flag. If your users have Acrobat/Reader 9.1 or above then you could also use the cancelAction method (however this is a bit flaky in I think version 10.0).

For example, in the button's preSubmit event:

if (event.target.dirty == true) {

     xfa.event.cancelAction = true;

}


You would also want to include a beep and/or messageBox warning to the user.

Hope that helps,

Niall

Avatar

Former Community Member

Hi,

Thanks for the reply.

Its working fine.I want to do this before closing the form also.How can I do that?

Raghu.

Avatar

Level 10

Hi,

That is tricky. You could try the docClose event, but I am fairly sure that this event will fire too late for your purposes.

Niall