Adaptative button text

Problem

You want the text on a button to change according to circumstances, such as at the end of sections in a questionnaire.

Solution

Use conditionnally recalled values in the pound instructions that define the text on buttons.

Discussion

First, let's clarify which pound instructions control the text of the buttons (note that the same trick could be used to change the image used by image-based buttons):

  • # Forward text
  • # Submit text
  • # Backwards text
  • # Unlock text
  • # Stop text

Let's focus on the "Next page" button (# Forward text) — the discussion applies to the other instructions.

The common use of this instruction is as follows:

    # Forward text = [EN]Next page >>>[FR]Page suivante >>>

This will show the text "Next page >>>" on the submit button on every page that is not CULDESAC or SUBMIT.

Let's separate the text of the button from the # Forward text instruction. The following # Recall instruction creates a &#NEXTBUTTON recall that outputs the button text:

    # RECALL NEXTBUTTON = [EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON

Now, let's say that the questionnaire designer would prefer to have a button that says "Submit section 1" and the end of section 1. They could use the following instructions:

    # RECALL NEXTBUTTON =
       #> [QUESTION(ENDS1)][EN]Submit Section 1[FR]Envoyer la section 1
       #> [ELSE][EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON

This solution assumes that ENDS1 is the question displayed at the end of Section 1. Any other condition could be used. Several conditions could be created as well as in this:

    # RECALL NEXTBUTTON =
       #> [QUESTION(ENDS1)][EN]Submit Section 1[FR]Envoyer la section 1
       #> [QUESTION(ENDS2)][EN]Submit Section 2[FR]Envoyer la section 2
       #> [ELSE][EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON

Adaptative button text

Problem

You want the text on a button to change according to circumstances, such as at the end of sections in a questionnaire.

Solution

Use conditionnally recalled values in the pound instructions that define the text on buttons.

Discussion

First, let's clarify which pound instructions control the text of the buttons (note that the same trick could be used to change the image used by image-based buttons):

  • # Forward text
  • # Submit text
  • # Backwards text
  • # Unlock text
  • # Stop text

Let's focus on the "Next page" button (# Forward text) — the discussion applies to the other instructions.

The common use of this instruction is as follows:

    # Forward text = [EN]Next page >>>[FR]Page suivante >>>

This will show the text "Next page >>>" on the submit button on every page that is not CULDESAC or SUBMIT.

Let's separate the text of the button from the # Forward text instruction. The following # Recall instruction creates a &#NEXTBUTTON recall that outputs the button text:

    # RECALL NEXTBUTTON = [EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON

Now, let's say that the questionnaire designer would prefer to have a button that says "Submit section 1" and the end of section 1. They could use the following instructions:

    # RECALL NEXTBUTTON =
       #> [QUESTION(ENDS1)][EN]Submit Section 1[FR]Envoyer la section 1
       #> [ELSE][EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON

This solution assumes that ENDS1 is the question displayed at the end of Section 1. Any other condition could be used. Several conditions could be created as well as in this:

    # RECALL NEXTBUTTON =
       #> [QUESTION(ENDS1)][EN]Submit Section 1[FR]Envoyer la section 1
       #> [QUESTION(ENDS2)][EN]Submit Section 2[FR]Envoyer la section 2
       #> [ELSE][EN]Next page >>>[FR]Page suivante >>>
    # Forward text = [EN]&#NEXTBUTTON[FR]&#NEXTBUTTON