Have an idea?

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

Changing the Attribute Level text for the BYO question

Hi
I'm using the following unverified perl from the help section (see below).
I want tho show the text in "else return" secion in another colour. When I use the text editor and add font colour the questionnaire section is not working anymore.

Any idea?



 [%   
  begin unverified perl  
  if(QUESTIONNAME() eq "widgit_BYO")  
  {  
  return "Here's the level text to show in the BYO question for Attribute 3 Level 1";  
  }  
  else  
  {  
  return "Text for Attribute 3 Level 1";  
  }  
  end unverified  
  %]
asked Sep 13, 2012 by anonymous
retagged Sep 13, 2012 by Walter Williams

1 Answer

0 votes
try this
[%   
  begin unverified perl  
  if(QUESTIONNAME() eq "widgit_BYO")  
  {  
  return "Here's the level text to show in the BYO question for Attribute 3 Level 1";  
  }  
  else  
  {  
  return "<font color="#00FF00">Text for Attribute 3 Level 1</font>";  
  }  
  end unverified  
  %]

just replace it with your color code
answered Sep 13, 2012 by Bahadir Ozkurt Gold (16,830 points)
Hm if i do this the text remains blank - but no error message.
nested quotes :)

try this in the else..

return '<font color="#00FF00">Text for Attribute 3 Level 1</font>';
yes, ....these little things. thanky you.
...