These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

javascript from acrobat to livecycle

pikaman
Registered: Aug 6 2010
Posts: 2

Hello everyone,

i'm new to this forum and livecycle, too. 9_9

I've created a form in acrobat with a textfield for a code and below a field (read only) for the barcode that auto populates itself with the above mentioned code with the addition of "*" at the beginning and the bottom: I use a barcode font to achieve the correct barcode.

This is the code and it works like a charm (codice1 is the name of the field with the code):

event.value = "*" + (this.getField("codice1").value) + "*";

Now they asked me the possibility to add an image to the form, so i moved to livecycle, but... as you probably well know the javascript doesn't work anymore. :(

I read various documents, faqs and even made some tries but no luck.
Can someone please help me? I'm in serious trouble because today is my last day of work before the summer break (the image request is just some hours old), but i'll work on it until sunday if needed...

Thank you so much for any help and sorry for my english.

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
JavaScript is the other language available to LiveCycle Designer. The syntax of JavaScript changes but JavaScript will work.

For JavaScript, you can change the 'event.value' to '$.rawFormat'. You can access the value of another field with 'code1.formattedValue'.
.rawValue = "*" + code1.formattedValue +"*";
If you use FormCalc, your can use the 'Concat' funciton:
Concat("*", code1.formattedValue, "*")

George Kaiser

pikaman
Registered: Aug 6 2010
Posts: 2
Thank you so much!
You saved my summer! :)

I used the "rawValue" function and it works perfectly.


Again, thank you gkaiseril.