-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle regular form submission from a LiveView page (#24)
Closes #16 What changed? ============= Currently, we assume that if you're in a LiveView page, you're trying to submit LiveView forms with `phx-submit`. But people can have regular forms in LiveView pages. This commit handles that scenario. In order to handle that we introduce an error message when there are neither a `phx-submit` nor an `action`. In theory, form's don't need an `action`. The form's `action` defaults to the same page (i.e. `"/"`). But we don't want to just fallback to the normal form if there's no `action`. Instead we want to notify the user of an error -- we should expect a `phx-submit` or an `action`.
- Loading branch information
Showing
5 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters