netgen / NetgenInformationCollectionBundle

Information collection alike feature for eZ Publish 5/eZ Platform
https://netgen.io
GNU General Public License v2.0
19 stars 8 forks source link

Create named builder with content identifier and location id as name #25

Closed RandyCupic closed 4 years ago

RandyCupic commented 6 years ago

This should fix the problem when you have multiple forms of the same type, or with different type but the same field name, on the same page. Currently, if there are two forms with the field phone on the same page, both fields will have id="ezforms_information_collection_phone" and their labels will have for="ezforms_information_collection_phone". It will work only on first form, because the ID is no more unique.

After this fix, the form name will no longer be generated from form type (ezforms_information_collection). Instead it will be generated from content type identifier, with appended location ID (field example: id="contact_form_123_phone").

WARNING: this will change form name attribute, as well as id and name attributes on each field.

MarioBlazek commented 6 years ago

@RandyCupic please update tests accordingly :)

MarioBlazek commented 4 years ago

@RandyCupic thanks.