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

Bind field dynamically

oleg
Registered: Jan 28 2010
Posts: 4

Hi,

I'm trying to bind field dynamically but it seems not working.
Here is the code I'm using.
form1.TextField1.bind.match = "dataRef";
form1.TextField1.bind.ref = "$record.Address";

Can anybody suggest what needs to be done to make it work

Thanks,
Oleg

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Hmm, don't know if this will work, try making the change in the "Template" model. You may need to use XMLData operators to get the changes in, i.e., "clone()", modify, and then "setElement"

Binding to records is not simple. There's quite a bit of mapping structure in there. And the LiveCycle engin might need to be refreshed in order for the changes to take. Something like closing and reloading the file.

An easier approach would be to add bound fields that are hidden and then move data in and out of them as necessary.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script