Expand my Community achievements bar.

Need help regarding text field

Avatar

Level 3

Hi ,

I have a text field in my form which will contains a numeric value.Based on this value i have to show those many text fields to enter the name.

I have tried this code by keeping the texfield in a sub form and try to display subform  using instance manager .see the below script.

Textfield.NewState.presence="visible";

var oSubform = xfa.resolveNode("form1.Page1.Textfield");

oSubform.instanceManager.setInstances(3);

form1.Page1.Textfield.instanceManager.addInstance();

but this code is not working.

Please help me!!

Thanks in advance

bharathi.

2 Replies

Avatar

Level 10

you can't use the instanceManager for a TextField.. your oSubform should represents a Subform not a TextField

you can use instanceManager only for containers such as rows and subforms

Avatar

Level 3

In the above i gave my subform name as Textfield .i am using for subforms only but though it is not working