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

Handling forms. #4

Open
ioquatix opened this issue Apr 19, 2021 · 1 comment
Open

Handling forms. #4

ioquatix opened this issue Apr 19, 2021 · 1 comment

Comments

@ioquatix
Copy link
Member

I think we need to introduce Live::Form to handle form data. Specifically, I think we need a way to handle form data as part of the tag data set. However, we want to avoid serialising that data in a way which makes it difficult to recreate the form. We also want to handle onsubmit too, possibly in a more explicit way.

class Form < View
	def submit(fields)
		# The submit button was clicked, fields was the form data at that time.
	end
end

I'm not sure if we can have an effective fallback to non-WS/JS forms.. if a user has multiple forms on the page, submitting a form shouldn't break the UX for other regions on the page.

@pharmac1st
Copy link

#6
@ioquatix

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