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

Clarify how to render the response of a GET form request #91

Merged
merged 1 commit into from
Jun 18, 2022

Conversation

srt32
Copy link
Contributor

@srt32 srt32 commented Apr 12, 2022

After reading the docs at https://turbo.hotwired.dev/handbook/drive#redirecting-after-a-form-submission, I thought that it was not possible to render the results from a successful (200) form request unless the form did a redirect and GET. However, after reading hotwired/turbo#398 I learned that you can replace the content and history with the results of a form request that is a GET request.

I may have misunderstood something here but I'd find it helpful to add a pointer to this technique in this section. I'm happy to edit this addition as necessary or move it to a better section if there is one. Thank you!

@netlify
Copy link

netlify bot commented Apr 12, 2022

Deploy Preview for epic-fermat-9d85e9 ready!

Name Link
🔨 Latest commit d746133
🔍 Latest deploy log https://app.netlify.com/sites/epic-fermat-9d85e9/deploys/6255c8b93f2f5b00085d754b
😎 Deploy Preview https://deploy-preview-91--epic-fermat-9d85e9.netlify.app/handbook/drive
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@dhh dhh merged commit 935fd13 into hotwired:main Jun 18, 2022
@4lllex
Copy link

4lllex commented Jan 1, 2025

This is a bit confusing. Turbo can already render GET form responses without redirecting (was this not always the case?). I imagine it is extra confusing for new people, since Turbo Frames are covered in chapter 4 and data-turbo-frame attribute goes over everyone's head.

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

Successfully merging this pull request may close these issues.

3 participants