-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
+1 same |
Seeing this w/ Textarea, too -- presumably all form inputs. This prevents me from using a traditional form redirect action. |
As a workaround you can use pass through: https://primevue.org/passthrough/
|
Fixed with #6891 |
pass through for DatePicker
|
+1, this is still not working for me even after #6891. Works with :pt:root:name="name" as said by others. |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
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: