Zu Hauptinhalten wechseln

FV Decipher Unterstützung

Alle Themen, Ressourcen für FV Decipher benötigt.


HTML Tag: Create a Comment Element

Using the survey builder? Learn more about the Comment Element.

1:  Overview

The <html> element is sometimes referred to as a survey comment and should be used to display text or HTML in you survey (e.g. "Now we're going to ask you about...").

Information can be added directly to the <html> tag or referenced from an external file using the source attribute.

<html label="Introduction" where="survey">
  <p class="large-font">Welcome to the survey!</p>
  <p>Please click "Continue".</p>

<html label="Disclaimer" source="disclaimer.html" where="survey"/>


<style name='respview.client.css'> <![CDATA[
      .large-font { font-size: x-large; }

The code above produces the following result:


By default, information written within the <html> element will be wrapped inside an <h3> header tag.

The following HTML tags can be used inside the <html> element and must be written in valid XML syntax (e.g. properly balanced and no missing tags):

b i em u a div ul table tr td span font small big br p li img

2:  Attributes

2.1:  source - Display Contents of an External File

The source attribute can be used to read the contents of a file located in your project's directory in to the survey.

For example, consider the following file (welcome_message.html) located in your project's directory (e.g. selfserve/9d3/proj1234/welcome_message.html):

File: welcome_message.html

    .large { font-size: 24pt; }
    .centered { text-align: center; }

<div class="centered">
    <p class="large">Welcome to the survey!</p>
        <img src="[rel logo.png]" alt="Brand Logo"/>
    <small>Please click "Continue" to proceed to the next page.</small>

The <html> element can be used to display the HTML above using the source attribute:

Survey XML

<html label="Welcome" source="welcome_message.html" where="survey" />

This produces the following result:


2.2:  final - End the Survey Without Saving Data

The final attribute can be used to end the survey immediately without saving the respondent's data. This is used often to show an error message indicating that something is missing and ending the survey on the spot.

For example, if a respondent enters the survey without one of the required variables, the message they are shown (e.g. "You are missing a variable. Please check the URL and try again.") is considered a final message. The respondent will still have the opportunity to fix the URL and try again without having to wait 15 minutes.

Here's a simple example:

<radio label="Q1" optional="0">
  <title>Before we continue the survey, have you finished reading the Employee Handbook Manual sent to you via mail?</title>
  <row label="r1">Yes</row>
  <row label="r2">No</row>

<html label="EmployeeHandbook_EndSurvey" final="1" cond="Q1.r2">
  Please finish reading the Employee Handbook Manual before continuing this survey. Once you've finished the reading, you may complete this survey using the same URL sent to your employee email address.

<radio label="Q2" optional="0" type="rating" values="order">
  <title>How would you rate the Employee Handbook Manual?</title>
  <col label="c1">1</col>
  <col label="c2">2</col>
  <col label="c3">3</col>
  <col label="c4">4</col>
  <col label="c5">5</col>

In the example above, respondents will not be able to take the survey if they respond "No" to having read the Employee Handbook Manual at question Q1. They will see the message "Please finish reading..." and not be allowed to continue the survey.


Click here to try out the short demo above.

2.3:  label - Set the HTML Tag's Name

The label attribute is used to create a unique symbolic name for the <html> element.

<html label="Introduction" where="survey">
    Welcome to the survey. Please click "Continue >>".

2.4:  where - Set Where to Display the HTML

The where attribute can be set to "survey", "report" or "none" to control where the <html> element should be shown.

By default, where="survey,report" is specified and the <html> elements will be displayed in both the survey and report.

If where="survey" is specified, the content will only be shown in the survey and not in the report. If where="none" is specified, the element will not be displayed anywhere.

For example:

<html label="Section_3" where="report">
    Beginning of Section 3: Brand Awareness

<html label="Brand_Awareness_Introduction" where="survey">
    Please answer the next few questions with those brands that you've used in the <b>past 6 months</b> in mind.

2.5:  cond - Set the Condition to Display the HTML

The cond attribute controls when the <html> element should be shown. If the condition specified evaluates to True, then the element will be shown.

For example:

<html label="CurrentCustomers" where="survey" cond="list == '1'">
  <p>Thank you for being one of our valued customers. We look forward to hearing from you again soon!</p>
  <p>Please click "Finish" to end the survey.</p>

<html label="ProspectiveCustomers" where="survey" cond="list != '1'">
  <p>Thank you for taking this survey! We'd love to have you as a customer. Please call us anytime: 1.800.421.4321</p>
  <p>Please click "Finish" to end the survey.</p>

Learn more: Adding Condition/Skip Logic

3:  What's Next?

Learn how to add the Comment Element using the survey builder.