Copy text fields value to new instance.


i have subform use "tag.instancemanager.addinstance(1);" create new instance of subfrom, want have button creates new instance copies values of current instance. (see below image, have provided hierarchy if helps)   there way have values copy new instance?  appreciated. thanks

example.png

hierarchy.png

hi,

 

if clone data node tag subform bound before addinstance(1) new form nodes bind new data nodes.

 

so try javascript in click event of copytagbtn

 

var tags = page1.resolvenodes("tag[*]");

// last tag clone

var tag = tags.item(tags.length - 1);          

// create new data group bind to

tag.parent.datanode.nodes.append(tag.datanode.clone(true));

// add new tag instance, bind new data group

tag.instancemanager.addinstance(1);

 

regards

 

bruce



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

Thread: Can not create raid array: mdadm: no raid-devices specified.

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

Thread: Twinview issues