Survey Forums

HomeHomeSurvey Project ...Survey Project ...Using Survey & ...Using Survey & ...Exposing VoterIDExposing VoterID
Previous
 
Next
New Post
8/9/2018 4:42 PM
 
Hi,

I want to show VoterID at completion screen. How do I do that?

For example (participant will see this at completion);
Thanks for taking my survey. Your unique number is "VoterID of participant". Please add this number your message while contacting us.



Tried "Advanced Completion" but couldn't manage it. I think I need an example :)
 
New Post
8/10/2018 1:35 PM
 
Hi,

Through Completion its not possible to get the voterid. If you make use of the Resultsreport option (URL in completion menu) you can add the following code to the resultsreport.aspx file to show the Voterid:

-- C# code inside asp:
<div>VoterID: <%=Convert.ToInt32(Session["voterid"]) %> </div>

The voterid is taken from the session data which is available after the submission of the surveydata and saving it to the database. 

Quick test to get it otherwise (see below script) dont seem to work.

-- jquery script:
<script>
$(document).ready(function () {
var voterid = '<%= Session["voterid"] %>';
alert(voterid);
});
</script
 
 
New Post
8/11/2018 9:55 AM
 
Hi,

I dupcilated resultsreport.aspx as resultsreport2.aspx and resultsreport3.aspx then,

1- added that div you wrote.
2- added jquery for hiding all question but title.
3- added a prompt function that show VOTERID.

Now it is just perfect. Thanks so much.
_________________

I have an another question.

Is it possible to show a pipe alias value on resultsreport.aspx?

For example (on report.aspx):

Thanks for thanks my survey. Please note these numbers;

Here is your voter id: 1453
Here is your Body Mass Index (pipe alias=bmi): 24

 
 
Previous
 
Next
HomeHomeSurvey Project ...Survey Project ...Using Survey & ...Using Survey & ...Exposing VoterIDExposing VoterID