Skip to content

Handling forms. #4

@ioquatix

Description

@ioquatix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions