Survey Project Help Articles

Miscellaneous Help Articles
How to retrieve client browser info using piping

How to retrieve client browser info using piping

In some scenarios it might be very useful to have more information about the users who are taking your forms. NSurvey provides several ways to gather external information from the users. 
In this example we will see how to get the user's browser and save it along with the posted answers using nsurvey's hidden fields and dynamic piping features.
A hidden field is basicaly an answer that is not shown and cannot be modified by the user. However it is possible to specify default values to these fields. You can have as many hidden fields as you whish and you can add them anywhere in any question. 
First we're going to add the hidden field to an existing question, you can choose any of your question. 
Go to the question's answer editor page 
Choose the question that will hold the hidden field 
Add a new answer 
Choose a "Field -hidden" answer type 
Specify some text, in this example User's browser
Ok as you can see there is a default value, we will use this default value field to pipe in the IIS server variable that holds the user's agent information. Its very easy to do.
Enter following text in the default text entry box 
Click on the add button 
You're done
Each time a new user will take the survey this hidden field will get automatically filled with the given server variable. In our case we choose to use the HTTP_USER_AGENT variable, but we could also have piped other server variable values or values coming from other sources like session, query strings or cookies or another question's answer.
Whats also interesting to note is that you could set branching or skip logic rules based on the runtime value of the hidden field. eg: if you want to show specific pages / questions only to user running IE 6.0 for example.

Previous   BackToCategory   Next  3 of 9