こんにちは、
JavaScript を使用して Livecycle ES2 で PDF フォームを作成中です。
以下のコードを使用する「クリック」イベントでフォームにボタン (Lockbutton1) を作成し、いくつかのサブフォームのすべてのフィールドを「読み取り専用」にしてから、ユーザーに「名前を付けて保存」ボックスを表示させます。
FORM.Page1.LockButton1::click - (JavaScript, client)
// Lock all fields in subforms except for signature subforms
oTargetField = this.resolveNode("SubformTop");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmDEP");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmLN");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmLNR");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmDEPR");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmDEPRD");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmDEPRI");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmLNRD");
oTargetField.access = "readOnly";
oTargetField = this.resolveNode("SubfrmLNRI");
oTargetField.access = "readOnly";
// Hide other buttons and text
this.resolveNode("ResetButton1").presence = "invisible";
this.resolveNode("PrintButton1").presence = "invisible";
this.resolveNode("FormType").presence = "invisible";
this.resolveNode("$").presence = "invisible";
this.resolveNode("Splashtxt").presence = "invisible";
// Save the form
app.execMenuItem("SaveAs");
ただし、ユーザーがロック ボタンをクリックすると、最初に [名前を付けて保存] ボックスが表示され、フォームが保存されると、コードの残りの部分が開始され、サブフォームが読み取り専用になり、ボタンとテキストが非表示になります。 .
これがコード内から最後に開始する必要があるのに、最初に開始するのが「名前を付けて保存」ボックスである理由がわかりません。
以下の順序で作業するプロセスが必要です。
- ユーザーがロック ボタンをクリックします。
- 指定したサブフォームは読み取り専用に変更されます。
- ボタンとテキストが非表示になります。
- 「名前を付けて保存」ボックスが表示されます。
何が起こっているのか、どうすれば修正できるのか、誰にもアイデアがありますか?
よろしく、
あ