Announcing the Global SNUG Board of Directors. Learn more here

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

Displaying a survey in a cms environment

Jerry20
Tera Contributor

I'm displaying a survey on a cms page using a GlideOverlay.   The survey displays on the screen, two issues I am encountering, one minor and one major in my opinion.   When I click on the submit button to submit the survey, the survey goes to the End Note page.   I have a link the user can click and it will take them back to the cms page, however this is not how I want it to work.   I am trying to get it to work like the risk assessment survey, where the user clicks the submit button and the user stays on the same page.   The minor issue I refer to is the size of the window.   Using GlideOverlay does accept sizing parameters.

 

var d = new GlideOverlay({

  title: 'Take Survey',

  form: 'survey_take'

  });

d.setPreference("sysparm_survey", 'Self-Service survey');

                  d.render();

}

14 REPLIES 14

Artemis15
Kilo Guru

Yes,


You can pass like this:,



var ol = new GlideOverlay({


                id: 'Take Survey',


                  title: 'Take Survey',


                      form: 'survey_take'


                closeOnEscape: false,


                showClose: false


          });


          ol.setWidth(250);


          ol.setBody('<img src="images/ajax-loader.gifx" width="220" height="19"/>');


          ol.center();


          ol.render();



Hope it helps.



Thanks,


Akash Rajput


zameer
Kilo Contributor

Hi Akash,



I am new to SNow, just wondering where does this GlideOverlay scripts need to be added to get the survey functionality in CMS page.



Thanks in Advance,


Zameer


Hi Zameer,



You can write this script in content pages.


Did you find the answer to this? Did you create a Dynamic content block?