Form Element Naming Conventions

Form element names are referenced one way in Salesforce B2C Commerce (in a template or a pipeline) and appear in a different way in the rendered HTML.

In a form In HTML
The first identifier is CurrentForms. The first identifier is dwfrm, which is used to identify POST values related to this form instance.
The second identifier is the name of the form. The second identifier is the name of the form.
Each subsequent identifier within the name is separated by a point (.). Each subsequent identifier within the name is separated by an underscore (_).
Subsequent identifiers form a path expression to the fields in the form. Subsequent identifiers form a path expression to the fields in the form.
In the case of a list, the < list> element is used. In the case of a list, the index number of the list item is inserted as the identifier.

This is how names appear in templates:

CurrentForms.NewAddress.Street
CurrentForms.AddressBook.addresses.city

This is how names appear in HTML:

dwfrm_NewAddress_Street
dwfrm_AddressBook_addresses_0_city ( 0 represents an index position)