Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Changing an attribute Level label in the BYO

I have a none level that I would like to show the word "None" during the BYO, but show blanks for the rest of the section currently the code looks like this :
<option id="ACBC_BYO_9_1_label" value="1">&nbsp; </option>
but when I change to this:
<option id="ACBC_BYO_9_1_label" value="1">None </option>
nothing happens :( - can someone help please?
asked Mar 28, 2018 by anonymous

2 Answers

+1 vote
Using CSS to show and hide things might be a great way to do this.  First identify the text you want to show and hide and then wrap a span or div tag around it.  So if you have a none level you could do this to the text:

<span class="none_level">None</span>

This basically allows you to assign a name to the text.  Now using CSS you can show and hide it.  Click on Compose, Survey Settings, then Headers and Footers.  Enter this into the HTML head tag:

<style>
    .none_level
    {
        display: none;
    }
</style>

This will hide the "None" level everywhere in the survey.  Now add some CSS to show the none text in the BYO.  Go into the BYO question and place this in the footer:

<style>
    .none_level
    {
        display: block;
    }
</style>
answered Mar 28, 2018 by Justin Luster Silver Sawtooth Software, Inc. (6,950 points)
0 votes
I have done something similar in past.

We made two list - Text 1 and Text2 and wrote following code.

You can change text condition of unacceptable and must haves as per requirement.

[% Begin Unverified Perl

if(QUESTIONNAME eq "ACBC_BYO") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_Unacceptable1") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_Unacceptable2") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_Unacceptable3") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_Unacceptable4") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_Unacceptable5") { return LISTLABEL("Text1",1);}

if(QUESTIONNAME eq "ACBC_MustHave1") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_MustHave2") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_MustHave3") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_MustHave4") { return LISTLABEL("Text1",1);}
if(QUESTIONNAME eq "ACBC_MustHave5") { return LISTLABEL("Text1",1);}

else { return LISTLABEL("Text2",1);}

End Unverified %]
answered Mar 28, 2018 by Saurabh Aggarwal Gold (30,135 points)
Thank you! I tried that and unfortunately it didn't work (I think it doesn't work for me because I need to tell it which List to replce),  but I did find a solution that did. I used:

<script>
document.getElementById("ACBC_BYO_8_1_label").innerHTML = "None";
</script>

<script>
document.getElementById("ACBC_BYO_9_1_label").innerHTML = "None";
</script>

Now I just have to figure out how to apply it to the Unacceptables and Must Haves....
For Saurabh's code, you may need to add pairs of parentheses after each "QUESTIONNAME," like this:

QUESTIONNAME()
...