Survey123 Connect - Custom Thank You Screen

2276
8
Jump to solution
11-09-2021 01:45 PM
kim77
by
New Contributor II

After a survey is submitted, I would like to run some JavaScript that would retrieve information about the survey that was just submitted in order to populate the "thank you screen".

For example, I would like to include a URL (using the Survey123 URL Parameters) so that the user can create a copy of the survey they completed. In order to do so, I need to get the globalid value from the survey AFTER it is submitted. 

Currently, there is only 1 "generated_note_prompt_submitted" line allowed in order to generate the "thank you screen" content (described in this post here: https://community.esri.com/t5/arcgis-survey123-blog/what-s-new-in-arcgis-survey123-december-2020/ba-...), but in order to run the JavasScript processes described above, and provide formatted text and information, more than a single row would be necessary. 

Are there any alternative methods to what I am trying to do? Or is there a way to include more than 1 "generated_note_prompt_submitted" record in a Survey123 Connect XLSForm?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @kim77,

It is not currently possible to run JS functions on the thank you screen, or have more then one entry in the XLSForm for the thank you screen note. 

For security purposes, JS functions can only be run when certain conditions are met and via pre-defined allowed inputs inside the survey. Running JS functions after the survey is submitted on the thank you screen would need to be assessed from a security point of view to ensure it does not create any vunerabilities.

Regards,

Phil.

View solution in original post

0 Kudos
8 Replies
by Anonymous User
Not applicable

Hi @kim77,

It is not currently possible to run JS functions on the thank you screen, or have more then one entry in the XLSForm for the thank you screen note. 

For security purposes, JS functions can only be run when certain conditions are met and via pre-defined allowed inputs inside the survey. Running JS functions after the survey is submitted on the thank you screen would need to be assessed from a security point of view to ensure it does not create any vunerabilities.

Regards,

Phil.

0 Kudos
kim77
by
New Contributor II
HélèneTouyéras
Occasional Contributor II

Good morning @kim77 and @Anonymous User ,

Would users of the Field App be able to see a thank you screen ?.

I struggle to set it up in Connect (my whole survey becomes blank if I insert a note named "generated_note_prompt_submitted"!) ? Given that my users will definitely use the field app and not the web app, is this a lost battle ^^ ?

 

Many thanks!! 🙂

 

Hélène

0 Kudos
by Anonymous User
Not applicable

Hi @HélèneTouyéras,

No the field app does not support the "thank you screen". It is only supported in the web app. There is no post submission screen to display text or notes on, once a survey is submitted it returns yo to the survey info page. This is due to different workflows and offline support in the field app. We do have an enhancement in backlog to support something similar in future, but it is not current in the roadmap.

Regards,

Phil.

HélèneTouyéras
Occasional Contributor II

Many thanks for your fast reply @Anonymous User !

The thank you screen would have been most appropriate for instructions on what to do after the survey is submitted (thank you is nice...  and can also be put to good use ^^).

I had not thought of using the survey info page for the same purpose, thanks for reminding me of it! Yes, I can very easily use it to point what user should do after completing the survey.

My thanks again!


Hélène.

HélèneTouyéras
Occasional Contributor II

Hi @Anonymous User, it's me again ^^

To be complete, my aim is to give users a hyperlink for their next step.

The Survey123 info page does not support hyperlinks, nor the thank you screen. There is no way to point them in the right direction after (and only after) they have submitted the survey.

Hyperlinks can be used within the survey (before sending), but then any value sent by the survey is not available yet for usage.

=> I'll open a new idea and hope for a hyperlink support in the info page.

Cheers,

 

Hélène

HélèneTouyéras
Occasional Contributor II

Partial solution is inserting hyperlinks in the info page by editing the form "details" page on AGOL/Enterprise: https://community.esri.com/t5/arcgis-survey123-questions/survey-description-hyperlinks/m-p/791570

However, updating the form deletes the hyperlink

=> new idea posted here:

https://community.esri.com/t5/arcgis-survey123-ideas/hyperlink-support-in-survey123-field-app-info/i...

 

 

 

Rami-Alouta
Esri Contributor

An updated solution for this thread:

 

Please try using Customize form elements with  generated_note_prompt_submited filed name you should be able to retrieve any field data in note type question.

Regards,

Rami

0 Kudos