Skip to content

feat: add option to not quit form after submission#469

Open
jonas-grgt wants to merge 1 commit intocharmbracelet:mainfrom
jonas-grgt:feat/not-quitting-form
Open

feat: add option to not quit form after submission#469
jonas-grgt wants to merge 1 commit intocharmbracelet:mainfrom
jonas-grgt:feat/not-quitting-form

Conversation

@jonas-grgt
Copy link
Copy Markdown
Contributor

Adds the option to keep the form visible after submission. Afterwards the form could be reactivated using f.Init().
This is useful for when submitting something that might fail and needs some further editing.

@jonas-grgt jonas-grgt force-pushed the feat/not-quitting-form branch 2 times, most recently from ef38ce1 to c94f4d1 Compare November 17, 2024 10:26
@jonas-grgt
Copy link
Copy Markdown
Contributor Author

This should close #446

@jonas-grgt jonas-grgt force-pushed the feat/not-quitting-form branch 2 times, most recently from 8c463aa to c5787a7 Compare November 17, 2024 17:33
@jonas-grgt jonas-grgt force-pushed the feat/not-quitting-form branch from c5787a7 to 3364066 Compare January 5, 2025 11:21
@bashbunni bashbunni added the enhancement New feature or request label Jan 8, 2025
@jonas-grgt
Copy link
Copy Markdown
Contributor Author

Maybe it would be better to expose this functionality through an explicit setter instead of directly exposing the field?

As in:

form.WithQuitAfterSubmit(false); // to not quit the form after submitting

WDYT?

@jonas-grgt jonas-grgt requested a review from a team as a code owner July 5, 2025 09:23
@jonas-grgt jonas-grgt requested review from bashbunni and removed request for a team July 5, 2025 09:23
@jonas-grgt jonas-grgt force-pushed the feat/not-quitting-form branch from bd036ba to 65796e2 Compare November 12, 2025 07:03
@jonas-grgt
Copy link
Copy Markdown
Contributor Author

Just rebased this PR to resolve conflicts and keep it up to date.
Would love to get some feedback or a quick review when you have a moment, happy to make any changes needed to get this merged in. Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants