-
Notifications
You must be signed in to change notification settings - Fork 69
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
Adding the form
property to the button, input, and textArea components.
#1169
Comments
I'm trying to get a better understanding of the problem. Is there some reason why the elements can't be placed inside the actual form? |
HTML does not allow for nested forms, and the structure of our pages requires a tab element with another form with other elements outside the tab structure in the primary form. If we had the ability to just add in the |
I'm still not understanding the change that is being asked of us. In your code snippet you're using Based on what I know right now, the short answer is I don't think it's possible for us to do this with our web components right now because Stencil, the tool we use, doesn't support formAssociated components. |
The code snippet does use the The VA Text Input or the VA Button don't support this If this is not possible then that is fine, just was hoping to use the VA elements but still be able to create complex forms without nesting them (because we can't) inside the pages. |
Sounds good. If form-associated components become an option in Stencil we may revisit this. |
Duplicate check
This update is for:
Component
What is the name?
button, text input and textarea
What is the nature of this update?
What problem does this solve?
When creating a
form
element, a user can set anid
for the form to then assign to aninput
,textArea
, orbutton
element to allow these elements to be in the form without them having to be in the<form></form>
structure. This is useful when a user needs to have multiple forms in a specific UI but have elements for one form around elements for another form like a nested tab structure or something. The forms can be created at the top level while creating inputs throughout the page.For our application, we have a screen that has two forms with disproportionate elements due to a tab view that we cycle through. Using the
form="id"
property allows us to link the form elements to the correct form foronSubmit
function calls to grab the right fields and properties. Having this in the VA design elements would allow us to maintain this feature but also use the built in functionality of the component like validation and required properties.Additional Context
Image of the 1st form
Image of the second form in the tab that is inside the same parent components.
The text was updated successfully, but these errors were encountered: