I want to replace some of the text in a SharePoint Survey at runtime. The idea behind that is to add a "header" or "title" to questions that are related together. For example, let's say I have 2 related questions, a page separator, and
2 more related questions: (yes/no type of questions):
Q1. Are you between 20 and 40?
Q2. Did you went to college?
The result on the final Survey should look like this:
Tell us about you.
Are you between 20 and 40?
Did you went to college?
Indicate what programming languages you know:
Simply, I tried to use the document.body.innerHTML.replace() in order to replace:
- Q1 with: <h2>Tell us about you.</h2>
- Q2 with '
- Q3 with: <h2>Indicate what programming languages you know:</h2>
- Q4 with: '
Using the technique below, I added the following code in SharePoint Designer in
<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server">
document.body.innerHTML = document.body.innerHTML.replace(/Q1/g,'
View Complete Post