Text Blocks in SharePoint 2013 Surveys

mjs082969
mjs082969 used Ask the Experts™
on
I am trying to include some text blocks on a SharePoint 2013 Survey.  It would seem that there would be some functionality that allows for this, but there is not.  Is there a way around this?  I need to include some titles and directions at the beginning of the survey, and some informational text throughout the survey.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The only way i can think of is using Jquery. Surveys has different files like newform.aspx or display.aspx.
First build your surver then open the survey page in browser
Now using developer tools or f12 point tot he locations where you want your text blocks or data has to be written.
let' say this is the id of the span "ctl00_PlaceHolderMain_wikiPageNameEdit" we want our text to be written above this.

Now make note of all the ids of all the elements that you would like this.

Next step go to sharepoint designer  browse to your survey and from the forms folder pick the page, it has to be one of the page like editform.aspx, displayform.aspx or newform.aspx.
Edit that file in advanced mode
add a script block

<script>
$( "#ctl00_PlaceHolderMain_wikiPageNameEdit" ).prepend( "<b>My text block </b>" );

$( "#anotherid" ).append( "<div class=extradata>My text block </div>" );

</script>

Open in new window


save the page and test it. Try adding it with a div or any another element with an id or class that will help you to style it if needed in future.
FreddSharePoint Jedi
Commented:
SP Surveys are very limited in their customization and in general, not very useful -  you're better off using survey monkey if that can apply to your situation.
FreddSharePoint Jedi

Commented:
Question answered.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial