Avatar

Level 10

Few things to check.

1) Make sure your form is saved as Dynamic PDF.

2) Under File -> Form Properties menu, under Default tab, make sure the "Preserve Scripting changes to form when Saved" is set to Automatically.

3) Place a messageBox command to see what is the actual value of the field at the time of opening the form.

          xfa.host.messageBox("The saved value is " + k);

You can place the code in the initialize event of the field.

Thanks

Srini