1

I have a few JavaScripts that worked well in Acrobat. I haven't been able to get them to work in Adobe ES4 LiveCycle Designer (I'm a novice).

One of the JS is to enable a tick in a checkbox when text is entered into a text field.

In LifeCycle ES4, I have entered the JavaScript in Script editor, and have 'Show: Validate*'. Unfortunately JavaScript seems not to be working. Any help greatly appreciated. Acrobat JavaScript I'm trying to convert to ES4 is:

 this.getField("checkbox 1").checkThisBox(0, (event.value!=""));

Kind regards

Kevin

5
  • It should say 'Dear Experts' at the top. Thanks Commented Dec 2, 2016 at 15:23
  • Could use more code of what you are doing. And please tell what you want to happen, and how it works now. Commented Dec 2, 2016 at 15:26
  • Hi Flummox - sorry late reply. I have a form with many text fields which need to be completed. There will be a check box linked to each text field (for tracking purposes). This will then quickly indicate which text fields have yet to be completed. I have used this code in Acrobat and it works, however I wish to use ES4 designer, and the code needs to be compatible. Sorry I hope this is answering what you asked me, and thank-you for your help. Commented Dec 6, 2016 at 11:24
  • PS I can add a PDF document created in Acrobat to show what i mean - many thanks Commented Dec 6, 2016 at 14:50
  • Might be better to link to images you have loaded elsewhere. meta.stackexchange.com/questions/75491/… Commented Dec 6, 2016 at 14:57

2 Answers 2

1

In short, there is no way to automatically/programmatically convert Acrobat JavaScript to XFA JScript. The object models, as well as the event handling models are too far apart.

The most reliable way to do such a conversion is to know what the Acrobat JavaScript is doing, and then find a way to do the same in XFA JScript.

In other words, recreate the script.

Sign up to request clarification or add additional context in comments.

2 Comments

OK excellent. Many thanks. Sorry if this is inappropriate but would you be able to help with this? and if so how much will that be? Many thanks
I feel honored upon this request, but I must admit that my expertise is with Acrobat JavaScript, and not at all with XFA JScript…
0

Use the capabilities of LiveCycle.
Create the checkbox. Create the text field. Right-click on the text field. Select Add Action. Set the condition of when the text field is not empty, the value of the check box to be checked. Optionally you may want to also set the check box to read only.

I'm doing this for a form I'm creating where a comment is required before the item can be checked off.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.