Expand my Community achievements bar.

SOLVED

Is it possible to add bullets to subform??????????

Avatar

Level 3

HI ,

I have a subform ,which has a text field and two buttons (add button and remove button).And on-clicking on add button  the subform instances will be added.

by clicking on remove button the instances of subform will be removed... i want to add a bullets and numbering of subform .Could any one please help me!!!!!!

I have tried by using this function.

var i =0;

function addBullets()

{

var oPath = xfa.resolveNodes("Page1.BankAccount.CloseAccount.bankAcccntNum[*]");

var len = oPath.length;

if(i<=len)

{

i++;

textfield.rawValue =i;

}

}

i am calling this function on click and initialize of button .For first instance of subform bullet is added .But later instances it is not adding .Please help Me

Thanks,

Bharathi.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

if you want to show an index number for each subform use a script in its index change event.


// Add current Instance Number into text field


textfield.rawValue = this.index + 1;


View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Hi,

if you want to show an index number for each subform use a script in its index change event.


// Add current Instance Number into text field


textfield.rawValue = this.index + 1;


Avatar

Level 3

Thanks for your help ,It s really working !!

If I am removing any instance  of subform .The index need to refreshed with current count of instances.How i can do this?

Avatar

Level 10

So I assume that the subform bankAcccntNum is the one to be repeated and it contains a textfield to display the index number?!

Then the index will update automatically when any of the subforms is removed.

If not, you propably use a different hierarchy of objects.

Could you then please add a link to your form, so can look at it?

Avatar

Level 3

hey ,the line u sent is working fine .My requirement is fullfilled.