Skip to content
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

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

Open
sngnt opened this issue Mar 14, 2022 · 3 comments
Open

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

sngnt opened this issue Mar 14, 2022 · 3 comments

Comments

@sngnt
Copy link

sngnt commented Mar 14, 2022

For example:
Table view
image

  • Clicking the "Create Item" button will display a modal form with no data.
  • Clicking the edit button on a row of the table will display a modal form with the data of that row.
    image

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

@deb17
Copy link
Owner

deb17 commented Mar 15, 2022

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
Copy link
Author

sngnt commented Mar 20, 2022

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
Copy link
Author

sngnt commented Mar 25, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants