Skip to content

Input field missing from form with errors, even though it is in the HTML response #1291

Closed
@pedantic-git

Description

@pedantic-git

Hi Turbo developers!

I'm experiencing a weird issue I don't know how to debug. You can see it for yourself here: https://devvelo.com/users/sign_up

If you get any error when submitting the form (for example, a password too short or confirmation doesn't match password), the form is re-rendered with the error message but the input itself is removed from the DOM. If you inspect the response, you can see the input is returned as part of the 422 response, but Turbo chooses not to render it / to remove it.

Disabling Turbo on the form causes it to behave as expected.

This is a standard Rails FormBuilder field, so it is wrapped with a .field_with_errors in the response - might this have something to do with it? Have I made some silly mistake? What tools would you use to debug this?

Thanks so much in advance for your help!

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