Answered

Redirect user in my application

  • 12 November 2022
  • 4 replies
  • 69 views

Hello!

I'm creating an app with the typeform where as soon as the user finishes responding and clicks "continue", he is redirected to another page of my application. I tried to use the onEndingButtonClick like this
<Widget id={formId} onSubmit={handleTypeformSubmit} onEndingButtonClick={gameplay} height={941} width={1919}/>
but it's not working. Can you help me?

icon

Best answer by jumpverso 14 November 2022, 21:25

View original

4 replies

Userlevel 7
Badge +5

Hi @jumpverso Happy Monday! I hope you had a great weekend. At the moment, we don’t support forms embedded within apps, but @mathio might be able to offer some suggestions for you. 😁

Userlevel 7
Badge +5

The callback is executed, however a redirect is performed. I will ask the team responsible for this feature.

In the meantime you can use redirectTarget="_self" to contain the redirect inside the iframe of your typeform and not navigate away from your app, if that helps.

Here is a sample CodeSandbox app: https://codesandbox.io/s/unruffled-cartwright-mlxutk?file=/pages/index.js

Hi!

Actually I solved it by doing a redirect inside the handleTypeformSubmit, which is called in onSubmit.

Thanks.

Userlevel 7
Badge +5

Oh! Thanks for sharing that, @jumpverso . Happy to hear that worked for you!

Reply