Skip to content

Error: Form responses must redirect to another location #22

@cj

Description

@cj

Hi,

I am using https://viewcomponent.org/ and I am handling redirects for forms using stimulus doing the following:

  async turboSubmit(event) {
    const { success } = event.detail

    if (success && this.redirectValue) {
      Turbo.visit(this.redirectValue)
    } else {
      this.enableSubmit()
    }
  }

But it currently throws this error Error: Form responses must redirect to another location, which is due to the following code

const error = new Error("Form responses must redirect to another location")
, is there a reason this is needed?

Cheers!

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