Is there a way to display a % sign in the piped text?

AprilApril Community Member Qubie ✭

Is there a way to display a % sign in the piped text?

For example, the initial question that we have is:

"Of the  justice-involved people your agency served, what percentage received any treatment for depression anywhere in the county in the last year?

There are two text box answer choices, one where the respondent can type in the "number" and one where they can type in the "percentage" if they do not know the number. When this enters into the subsequent questions, it looks like:

"Of the (PIPED TEXT)  justice-involved individuals who received treatment for depression anywhere in the county, how many received selective serotonin reuptake inhibitors for depression in the last year?"

The problem is that when they enter a percentage, the subsequent question does not show "percentage." For instance, if their answer was 30%, the subsequent question reads, "Of the 30 justice-involved individuals" rather than "Of the 30% justice-involved individuals..." Is there a way to have the "$ of the" show up automatically if they answer in the "percentage" text box without having to make completely different questions to trigger with this text?



  • SurajKSurajK IndiaCommunity Member Sage ✭✭✭

    You can simply add the % in one of the span and based on the selection at the previous question you can show or hide the symbol.

    <span class="percent">%</span>

    Initially make this as hidden and based on the previous answer just make this symbol visible along with the number of percentage entered in the previous question.

    var percentval = "${previous question percentage value}"
    if(percentval !='' || percentval >0){jQuery(".percent").css("display","inline")}
Sign In to Comment