InputText: Name attribute not applied when used outside of Form component #6737
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When you use an InputText component outside of a
Form
component - note the capital F here - (e.g. inside a native<form>
element or otherwise) and you apply aname
attribute to that InputText component, then thename
attribute is not rendered in the resulting markup.This is a regression from previous versions of Primevue, and is not mentioned in any changelog. Therefore, I'm assuming its a bug.
Examples on the component's documentation feature the component being used outside of the
<Form>
parent (e.g. within a<div>
), and do not indicate that certain fields will only render within a given context.Since
name
s are used for native form submission, the removal of this functionality is, I believe, a breaking change.Reproducer
https://stackblitz.com/edit/nlblb9-7eepxq?file=src%2FApp.vue,package.json
PrimeVue version
4.2.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Nuxt
Browser(s)
No response
Steps to reproduce the behavior
Add a
name
attribute to an InputText element.View the resulting HTML rendered.
NB: This also affects other input types too - but InputText is the most widely used and easy to reproduce.
Expected behavior
The
name
attribute set on the InputText element should appear on theinput
element in the HTML, as described in the documenation.e.g.
...should render....
The text was updated successfully, but these errors were encountered: