Skip to content

Document form handling - #18

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
document-form-handling
Sep 7, 2026
Merged

samuel-williams-shopify merged 1 commit into
mainfrom
document-form-handling

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Description

Document form submission using Live::Element#forward_form_event, including the forwarded event shape, repeated form controls, submit-button values, and normal HTTP fallback.

Add the example form to the resolver used by the getting-started guide. This keeps form handling within the existing view/event model rather than introducing a specialized Live::Form.

The forwarded payload retains the conventional JavaScript/JSON formData key, exposed as event[:formData] in the symbolized Ruby event hash.

Fixes #4.

Testing

bundle exec bake decode:index:coverage lib

bundle exec sus test/live/element.rb test/live/page.rb test/live/resolver.rb test/live/view.rb

git diff --check origin/main...HEAD

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Assisted-By: devx/7ef83274-928f-499d-b668-48449b1ff60e
@samuel-williams-shopify
samuel-williams-shopify merged commit a7c1fee into main Sep 7, 2026
34 of 39 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the document-form-handling branch September 7, 2026 09:16
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

Successfully merging this pull request may close these issues.

Handling forms.

1 participant