deb17 / flask-modals

Modals for flask
MIT License
9 stars 13 forks source link

Can you give a CRUD example with flask-modal? #1

Open sngnt opened 2 years ago

sngnt commented 2 years ago

For example: Table view image


Thank you. Hope to receive your reply as soon as possible.

deb17 commented 2 years ago

I tried out a CRUD system with the example app that I have provided in the repo. It works. The register form is like your "create" form and the subscribe form on the next page can get pre-filled data to act like your "update" form. Please tell me what problem you are facing or show me your repo.

sngnt commented 2 years ago

Thank you! I have 3 issues to take care of:

  1. For each row in the table I have to create a modal with its own id (use the for loop when creating the table data), right? If yes, will this make the html file large when the data table has many rows?
  2. When pressing submit button on modal and checking validate_on_submit() on server side, I want to show error on modal just like on normal form and modal not close until submit complete (Currently, when I press submit modal always close though there is some input errors).
  3. After the submission is completed, is it possible to update the table's data row in ajax mode?
sngnt commented 2 years ago

Can you please give me advice to solve my problems using Flask-modals. Thank you!