Component: Button cannot be associated with form #13897
Labels
Status: Discussion
Issue or pull request needs to be discussed by Core Team
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Type: New Feature
Issue contains a new feature or new component request
Describe the feature you would like to see added
The p-button control should expose a Form property.
Is your feature request related to a problem?
The p-button control does not expose a Form property. It won't be possible to associate a Form with a submit button which is useful when adding Submit buttons into separate templates (e.g. footer in dialog or side panel)
e.g. Dialog content
<form id="myform"></form>
e.g. Dialog footer
<ng-template pTemplate="footer"> <p-button type="submit" form="myform" label="submit"></p-button> </ng-template>
Describe the solution you'd like
p-button needs to expose a Form prop as per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form
Describe alternatives you have considered
Falling back to a standard button with the
pButton
directive.Additional context
No response
The text was updated successfully, but these errors were encountered: