Code Monkey home page Code Monkey logo

Comments (3)

seanpdoyle avatar seanpdoyle commented on July 21, 2024

Does the template you're rendering as part of the unprocessable_entity response include a <turbo-frame> element with an [id] attribute that matches the one that contains the <form> element?

from turbo.

culov avatar culov commented on July 21, 2024

Does the template you're rendering as part of the unprocessable_entity response include a <turbo-frame> element with an [id] attribute that matches the one that contains the <form> element?

Yes, they both have <turbo-frame> tags that use the same id.

from turbo.

JulianFeinauer avatar JulianFeinauer commented on July 21, 2024

@culov I can only comment here from a Django perspective. I have a similar setup (Modal triggered by a Stimulus controller). Django returns a 200 on Validation Errors so I want my frame replaced by the response (the returned Form with errors). In case of a successful submission I get a 303 from Django (which I catch in the turbo:submit-end as well) and close my modal then as well (or perform a global redirect with Turbo.visit()).

Wouldnt something like that work? But I know that Rails handles the responses to Form submissions quite different...

from turbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.