Fixed issue with prototype label not being correctly replaced in sub-forms

If you use a collection of custom form types, the label in the prototype is `__name__label__`.
This PR fixes this issue, by replacing the label with the current index.