Expand my Community achievements bar.

XFA scripting compatibility issue

Avatar

Level 2

Hi,

I have a PDF which has a required field and a submit button.

I was able to write a simple script to prevent the user from submitting if the required field is not filled.

xfa.host.messageBox("Please fill the required field");

xfa.host.setFocus(FieldName);

xfa.event.cancelAction = true;

Above script works fine with Acrobat Reader 9 but I ran into a problem with Acrobat Professional 7.

The message box pops up but the next 2 lines don't work.

Is there a way to achieve this regardless of Acrobat versions?

Thanks,

Jake

2 Replies

Avatar

Former Community Member

The cancel action method was added in version 8 ....so to answer your question ..not in version 7.

Paul

Avatar

Level 2

Thanks for your answer.

Then what would you recommend to prevent the user from submission?