Redirect user in my application | Community
Skip to main content
Answered

Redirect user in my application

  • November 12, 2022
  • 4 replies
  • 79 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?

Best answer by jumpverso

Hi!

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

Thanks.

View original

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15018 replies
  • November 14, 2022

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. 😁


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • November 14, 2022

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


  • Author
  • Explorer
  • 1 reply
  • Answer
  • November 14, 2022

Hi!

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

Thanks.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15018 replies
  • November 15, 2022

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


Reply