lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.datapage.app
MIT License
1.29k stars 69 forks source link

Form submission with button component. #113

Closed lovasoa closed 9 months ago

lovasoa commented 10 months ago

Discussed in https://github.com/lovasoa/SQLpage/discussions/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 commented 10 months ago

@Pieter3033

Pieter3033 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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

lovasoa commented 9 months ago

Implemented in 8d3c8dcf340770eaa4498ccef6a4b54721a39aac . It will be in the next release :tada: