Create inventory based on number of kids and grades


I have a form where I am trying to build logic around number of kids and the grades they are in for the catechism class. I want to be able to limit the number of kids per grade, but also have them register all the kids at once. I am using gp_inventory but I am not sure how to do that or what I am missing from a setup perspective. IF anyone can walk me through this that would be very helpful. Here is the link…

Any help would be appreciated