Question T11840
Visible to All Users

navigate to url issue

created 2 years ago

When i have an URL entered AND the checkbox ticked to display a custom html end page then a redirect is always performed. This is not the correct behaviour. I just want the end page with the custom html displayed regardless if there is an url or not configured. One of the options should be disabled and without an effect on the survey end page.

Clipboard-File-1.png

Usecase: I generate a custom end page where the result is stored. This page can be used as redirect url. The url is automatically generated and stored in the survey json. Now sometimes it is better to stay on the survey end page and display just a small "thank you" text. The url should not be deleted but somehow inactive displayed when the checkbox is ticked. The redirect should only be performed when the checkbox is not checked.

Answers approved by surveyjs Support

created 2 years ago

Hello Wolfgang,
If you specify the survey.navigateToUrl property, a user will be redirected to a specified URL at survey completion.

sometimes it is better to stay on the survey end page and display just a small "thank you" text

You can prevent a user from being redirected to a specified URL using the survey.onNavigateToUrl function. If you don't want to redirect a user, set the options.allow property to false.

Please let me know if this function works for you.

    Comments (2)

      Worked perfectly, thx!

        You're always welcome, Wolfgang. Please feel free to contact us if you have any questions or require further assistance.