Advanced Tutorial - Load responses from a server-side file

It is possible to load response from a file. To load responses from a file please follow these instructions. (EZSurvey Pro only)

Instructions:

Make a tab delimited ASCII file named states.asc with the fields STATE and LABEL. Put all of the state codes in the STATE field and all of the state names in the LABEL field. (When you save the file, make sure to give it read/write permissions by the web server). It will look like this:
	STATE   LABEL
	CA      California
	OR      Oregon
	WA      Washington
	

Next create a Single list type question in EZSurvey. Select the option Load responses from a server-side script. Enter the EZSurvey server-side script like this:

	<%report states.asc %>
	<option <%if $STATE eq STATE %>SELECTED<%endif %> value="{STATE}" >{LABEL}</option>
	</report>
	

Publish the survey and you will see the single list question have responses that are from the text file.

See also...