Skip to content

Form submission with button component. #113

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

Closed
lovasoa opened this issue Oct 24, 2023 Discussed in #112 · 5 comments
Closed

Form submission with button component. #113

lovasoa opened this issue Oct 24, 2023 Discussed in #112 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lovasoa
Copy link
Collaborator

lovasoa commented Oct 24, 2023

Discussed in #112

Originally posted by Pieter3033 October 24, 2023
Hi,

Is it possible to do a form submission with the button component, I know there is already buttons implemented inside of the form but I would like to do a form submission with the fancy new buttons.

Regards

@lovasoa lovasoa added the enhancement New feature or request label Oct 24, 2023
@lovasoa
Copy link
Collaborator Author

lovasoa commented Oct 24, 2023

  • The button component could add
    • a form row-level property that takes a form id
    • a formaction row-level property to allow multiple buttons to target the same form
  • The form component should add
    • an id top-level property

@Pieter3033

@Pieter3033
Copy link
Contributor

Hi, love the idea.

You should have in mind that one button should probably be able to handle multiple form submissions, considering that a form could only have one title.
(As the title is a Top-level parameter [Please correct me if I'm wrong])
(The title separates the different inputs for the forms.)

Just spitballing here, but maybe adding a array of form id's in the button component, which will allow the button to handle multiple form submissions?

@lovasoa
Copy link
Collaborator Author

lovasoa commented Oct 24, 2023

Unfortunately that is not something that browsers do. HTML only allows one button to submit one form. But we could add intermediate titles, and fieldsets inside the form.

@Pieter3033
Copy link
Contributor

I see, I'll have to do some research and get back to this topic.

@lovasoa lovasoa added the good first issue Good for newcomers label Oct 26, 2023
@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 7, 2023

Implemented in 8d3c8dc . It will be in the next release 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants