How do I show the number of words in text entry boxes? I have several on the page.

DaxDax Provo, UTFounding Community Member CEP (Chief Executive Paw-ficer)

How do I show the number of words in text entry boxes? I have several on the page.

How do I show the number of words in text entry boxes? I have several on the page.

Best Answer

Answers

  • JulieTJulieT WisconsinFounding Community Member Sage ✭✭✭
    edited November 2017
    1. Select your Text Entry question.
    2. Click on Custom Validation in the right panel.
    3. In the 2nd box, select your question text as the text to analyze.
    4. Pull down the 3rd box and change it from "Equal to" to "Matches Regex"
    5. Paste ^\s(\S+\s+){0,249}\S$ in the last text box. Change the upper number to the limit you choose.
  • AnthonyRAnthonyR Tucson AzFounding Community Member Superuser ✭✭✭✭

    @JulieT said:
    1. Select your Text Entry question.
    2. Click on Custom Validation in the right panel.
    3. In the 2nd box, select your question text as the text to analyze.
    4. Pull down the 3rd box and change it from "Equal to" to "Matches Regex"
    5. Paste ^\s(\S+\s+){0,249}\S$ in the last text box. Change the upper number to the limit you choose.

    This will let you limit the number of words, but it doesn't display the number of words while typing, which is what I think the question is. I'll try and work out the JS for this later today.

Sign In to Comment