Expand my Community achievements bar.

Need help with form fields.

Avatar

Former Community Member
I am completely new to this. I made a form with excel to keep it as close to the original as possible. When I finally get the form into LCD it says it contains artwork. I would like to place a "current date" field but it won't work. Is there any way to do this? Once I get that to work I have to figure out how to create a numeric field that is populated by the date and a sequential number. Then after all that I need to have it take the data from two fields on each document and populate a field on each document opened before printing. Without using the internet. Maybe a small local server or somehow through html? I think I am in way over my head since I can't even get the "current date" to work. By the way I am using Live Cycle designer 8.0
6 Replies

Avatar

Former Community Member
Under the object palette there are different object libraries. Choose the custom library and there us a current date object that exists in there. Simply drag and drop it on the form. It will use your system date format by default.

Avatar

Former Community Member
Yes I've got this. It's just that it doesn't work. I get a message about "parts of this object cannot be used in forms with pdf artwork". It will put the box there but it does nothing.

Avatar

Former Community Member
Ok I got it wrking. I had to spend a couple of hours playingwiththe settings. Now when I preview as pdf and adjust th date it gives me a pop up calendar. I can select a date on this and it displays the day of the week then the date spelled out. This is perfect except for the day of the week part. This field is completely unnecessary. I will try to figure this out when I get time unless someone can make a suggestion.



Edit: Nevermind I figured it out. Any Ideas on the scripts to run to populate field data from other fields. Or somewhere to study this?

Avatar

Former Community Member
To access a fields value simply look at the field in the hierarchy view and navigate down the path to the object in question. If you want to assign a value from one field to another you can do something like:



form1.page1.subform1.TextField1.rawValue = form1.page2.subform2.TextField2.rawValue;



In some cases you will see a this.rawValue. The this keyword signifies the object that is executing the code so if you are writing your code on the exit event of TextField1 then you can use:



this.rawValue = form1.page2.subform2.TextField2.rawValue;



Hope that helps

Avatar

Former Community Member
Thank you for your help. I am looking into the scripting process and it appears this may take awhile. Just for reference under hierarchy I have:

topmostSubform

Page1

All of my Fields



I cannot add anything except "Insert Script Object" on topmostSubform and Page1. I have downloaded "lcdesigner_scripting_reference.pdf. It is not the most newb friendly though it's a start. I will report my progress as I go.

Avatar

Former Community Member
You don't add the script in the hierarchy. You need to activate the scripting editor (Window/Scripting Editor). It will appear at the top of the drawing canvas. Now you acn write your code in that editor. The script will be associated with the object that has focus. You can choose different events as well as th scripting language (javascript) and the run at parameter (should always be client unless you know what you are doing).