Please forgive me if this is covered somewhere, but I have spent a few hours searching and have not come up with anything.
I have a dropdown list that allows the user to select the number of teams registering (1-5). I then have a subform with all the information needed for each team. I would like the subform to automatically repeat based on the number selected from the dropdown, since I need that information for each of the teams registering.
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
In the exit event of the dropdown, in formcalc, put something like:
var teams = $.rawValue
var counter = 1
while (counter < teams) do
Subform2.instanceManager.addInstance()
counter = counter + 1
endwhile
this assumes you already have 1 version of the subform. If you are starting with none make the while condition (counter <= teams)
Views
Replies
Total Likes
In the exit event of the dropdown, in formcalc, put something like:
var teams = $.rawValue
var counter = 1
while (counter < teams) do
Subform2.instanceManager.addInstance()
counter = counter + 1
endwhile
this assumes you already have 1 version of the subform. If you are starting with none make the while condition (counter <= teams)
Views
Replies
Total Likes
Hi BloodyCool,
Could you please try adding the followign line on the exit event of your dropdown field?
xfa.resolveNode(Subform2.).instanceManager.count = valueFromDropdown ;
Note : valueFromDropdown is the number choosen in dropdown field.
Thanks,
VJ.
Views
Replies
Total Likes
This is the route I'd go, no point in using a loop when you can set the count value explicitly.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies