Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I change Take Survey Widget to display short description in title

juliana3
Tera Contributor

I need to change the take survey widget and my surveys to show the short description of the Ticket. I couldn't find anything in the code.

find_real_file.png

9 REPLIES 9

Chuck Tomasi
ServiceNow Employee
ServiceNow Employee

It appears that it is getting displayed from line 28 in the HTML, but I'm not sure where data.title is being set (possibly through the URL?). In order to change it, you will need to clone the widget. You can then set this to what ever you wish from the server or client script in your new modified copy. Once you get it how you like, you can place it on the page.



find_real_file.png


I managed to do it. It has to change Widget Angular Provider spSurverForm.





De: ctomasi


Enviada em: quarta-feira, 15 de março de 2017 10:19


Para: Juliana Mendo <jmraimundo@stefanini.com>


Assunto: Re: - How do I change Take Survey Widget to display short description in title



<https://community.servicenow.com/?et=watches.email.thread>




How do I change Take Survey Widget to display short description in title



reply from Chuck Tomasi<https://community.servicenow.com/people/ctomasi?et=watches.email.thread> in IT Service Management - View the full discussion<https://community.servicenow.com/message/1105112?et=watches.email.thread#1105112>


Mussie
ServiceNow Employee
ServiceNow Employee

Hi Juliana,


How did you make the 'Take Survey' to work from within the Service Portal? Can you check this and let me know if you can help?


Launching Survey from Service Portal


Mussie


sudharsan1989
ServiceNow Employee
ServiceNow Employee

Starting from Jakarta, this will happen automatically. The breadcrumbs would say Take Survey - <Survey Title>. You could do it by doing something like


$timeout(function() {


  var bc = [{label: 'Take Survey - '+<title>, url: '#'}];


  $rootScope.$broadcast('sp.update.breadcrumbs', bc);


  }


  });



You could put this in the widget Take Survey's controller. Be sure to test it for invalid surveys as the description might be empty. The short description can be obtained from data.title in this case as it is populate through the script include SPSurveyAPI.