Conversation
|
Spec says that about identifiers: see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
Not sure if I'm correct, but wouldn't this change lead to the id attribute value potentially starting with a number? Shouldn't it be |
mficzel
left a comment
There was a problem hiding this comment.
Not so sure anymore as rendering an identifier by default is quite invasive. Assume there are better options to achieve the same.
|
Having an id attribute is the only way to associate an input with a label. Therefore, if a form field is used with a label, there is no way around an id attribute. I checked on other solutions, such as TYPO3 Powermail, TYPO3 Form Framework, WordPress Gravity Forms, all of them have id attributes by default. Personally, I think it's a no-brainer to just have an id attribute. But if we don't want this in Neos.Fusion.Form, we should at least be able to activate the id attribute: (Or similar) |
|
We should have a logic that ensures uniqueness for id's or use the optIn as suggested. Without that we can easily cause issues for documents that render multiple forms and wich very likely have some fields in common. Maybe we allow to set the id on the fieldContainer and only after that is done render it for label and field. |
|
Yes, the uniqueness should be established using a "namespace", in
|
|
@mficzel You merged sitegeist/Sitegeist.PaperTiger#18 in the meantime, but this one is still unmerged. How should be progress here? |
|
"Self correction": sitegeist/Sitegeist.PaperTiger#18 doesn't depend on this issue, it works well as long as there is only one form (or unique form field names) on a page. |
Closes #85