Users may utilize the View Source applet to review survey source code without having to worry about accidentally altering the code. The View Source applet uses the ACE text editor interface, line numbering, and other advanced key command functionality that is available in the Edit Source applet, while providing a read-only display of the code.
Viewing survey source code
To view the source code for a survey, expand the Review button group in the Survey Navigation menu and select Source. Users will be brought to the View Source applet.
To differentiate viewing the View Source applet from the Edit Source applet, the View Source window's background is colored blue.
Tip! The View Source applet defaults to displaying the "Latest Dev Source" - the most recent "development" version of the survey's source code. If the survey has been previously published, the Dev/Pub toggle button allows internal users to also view the "Published Source" - the most recent "pub" version of the survey's source code.
If the survey has never been published, or the most recent source version is the published version, the Dev/Pub toggle will deactivated, and users will only be able to view the Latest Dev Source. For more information on Dev/Pub, click on Dev/Pub.
Viewing referenced sheets
If a survey contains references to either survey spreadsheets (sheets attached "locally"/directly to a survey) or system spreadsheets (sheets attached to the server hosting the survey), the sheet reference will be shown underlined and in a blue font. To view a spreadsheet from the source code, hover over the sheet name/reference and press Ctrl + click (PCs) or ⌘ + click (Mac). This will open a new tab in which the sheet may be viewed.
Survey sheet links will bring the user to the Survey Spreadsheets applet, whereas system sheet links will bring the user to the System Spreadsheets applet.
Tip! Sheet references that do not begin with either the survey name or "system" do not allow Ctrl + click functionality.
Downloading survey source code
From the View Source applet, it is also possible to download the survey source. While viewing the source, click the Download button at the top of the screen above the survey source.
This button will begin the download of the survey's source code in a .txt file. The text file may then be viewed or edited in a standalone text editor program.
Comments
0 comments
Please sign in to leave a comment.