Sign in to Community
Sign in to view all badges
Expand my Community achievements bar.
What is the code I use to make the caption of a text field show the instance count of its parent subform?
this.parent.index will show you the instance of the subform that you are in.
So, how do I make it display?
This was my attempt:
xfa.resolveNode("this.caption.value.#text").value = this.parent.index;
"" + this.parent.index
Then it seems to work.
Woo hoo! Almost there. I need to add 1 to the index because otherwise it starts at 0.
How do I do that?
OK, I got it to work. This is what I did:
var number = this.parent.index + 1
xfa.resolveNode("this.caption.value.#text").value = "" + number;