I also took out id="b1" because you shouldn't have multiple elements with the same ID. If you really need the inputs to have IDs (why?), you'll need to give them different ones, perhaps by using the array index as part of the ID.