Skip to main content

FV Decipher Support

All the topics, resources needed for FV Decipher.

FocusVision Knowledge Base

Autosum Question Style

Autosum is a unique style that can be applied to number elements to display a running sum total as the respondent enters their response.

The following examples highlights the autosum style.

1:  Applying Autosum to a Question

To apply the autosum style to a question, select the number question so it appears in the stage. Then click on the "Basic" style link found in the top, right corner of the question.

The "Question Display Options" window will appear. Select "Autosum" in the dropdown menu. Then select "Save" and the default style will be applied to the question.

   
Form pre-text: Allows you to add text or symbols to the left side of the answer field. E.g., $__.
Form post-text: Allows you to add text or symbols to the right side of the answer field. E.g., __%.
Autosum pre-text: Allows you to specify text that appears to the left side of the sum indicator. E.g., Total:__.
HTMLcolor:

Sets the color of the autosum indicator when the sum does not meet the required amount. Enter the hex color code or valid CSS color name.

  • Example: #FF0000 or red will display the autosum in red if the sum does not equal the required total.
Pre-fill answer field: Allows you to pre-fill the answer fields with text, ideally a number (e.g., 0). The respondent will then have to change the text shown in the fields.
Show remaining: When checked the autosum indicator will start with the total and calculate the remaining amount for the total to be met.
Legend position:

Allows you to specify the position of the autosum legend in the answer grid.

  • top: Displays the legend at the top of the grid.
  • bottom: Displays the legend at the bottom of the grid. By default the autosum is shown at the bottom.

Click on the question so it appears in the stage area and the general options appear in the right panel. In the "Validate Sum" field, enter the required sum for the question. That is, the sum of the numbers the respondent must enter in order to be able to continue to the next question.

You can preview the element at any time by clicking on the "Preview" link located at the top right corner of the element. To find out more about the previewing an element, click here.

2:  Technical Information (XML)

The following information can be used to modify the question style in the survey XML.

The underlying question type for autosum is a "number" question.  To apply the autosum question style to a number question, add uses="autosum.5" to the question tag.

2.1:  Customization

  • Form pre-text (autosum:preText)
    • The text or symbols to the left side of the answer field.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: Blank.
    • Example -- autosum:preText="$"
  • Form post-text: (autosum:postText)
    • The text or symbols to the right side of the answer field.
    • Can be applied on row or col tag (depending on grouping).
    • Example -- autosum:postText="%"
  • Autosum pre-text: (autosum:sumPreText)
    • The text that appears to the left side of the sum indicator.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: "Total:."
    • Example -- autosum:sumPreText="Total:"
  • HTML color: (autosum:color)
    • Sets the color of the autosum indicator when the sum does not meet the required amount. Enter the hex color code or valid CSS color name.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: "red."
    • Example -- autosum:color="red"
  • Pre-fill answer field: (autosum:prefill)
    • The number the answer fields are pre-filled with.
    • Can be applied on row or col tag (depending on grouping).
    • Type=”string”; Default: Blank.
    • Example -- autosum:prefill="0"
  • Show remaining: (autosum:showRemaining)
    • When using autosum:showRemaining=”1" the autosum indicator will start with the required total and calculate the remaining amount.
    • Can be applied on row or col tag (depending on grouping).
    • Type="bool"; Default: false or 0.
    • Requires: "validate sum" in Builder question options or amount="" on question tag in XML.
  • Legend position: (autosum:legendPosition)
    • The position of the autosum legend in the answer grid. Options include "top" or "bottom."
    • Type="string"; Default: "bottom."
    • Requires grouping="cols."
  • autosum:disabled
    • Disable summing for a particular column, row or question (depends on grouping). 
    • Type="bool"; Default: 0.
  • autosum:amount
    • The threshold the amount must reach to return autosum:color back to the default color.  During summing, the sum color is displayed in "red" color (see autosum:color above). 
    • Can be applied on row or col tag (depending on grouping).
    • This can be used to match the sum of a previous question.
    • Type="string"; Default: amount="" if not overridden by autosum:amount.