Best answer by TomG
View originalCustom footer on different pages
Is it possible to hide some lines of text appearing in a survey footer for the first 3 pages of the survey only?
A
Hello @Nadaly ,
Add the following line in first three pages of your survey.
jQuery('#id of your text').hide();
Add the following line in first three pages of your survey.
jQuery('#id of your text').hide();
@Nadaly,
Put the footer text you want to hide inside a `<div>` with an id:
```
<div id="hideThis">
Text to be hidden
</div>
```
Also, add a script to your footer that will hide the `<div>` if a flag is present on the page:
```
<script>
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
```
Then, when you want to hide the footer text on the page, add this to the question text of one of the questions on the page:
```
<span id="hideFooterText"></span>
```
Put the footer text you want to hide inside a `<div>` with an id:
```
<div id="hideThis">
Text to be hidden
</div>
```
Also, add a script to your footer that will hide the `<div>` if a flag is present on the page:
```
<script>
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
```
Then, when you want to hide the footer text on the page, add this to the question text of one of the questions on the page:
```
<span id="hideFooterText"></span>
```
If I just want to see the footer for some of my questions and suppress it for others, is this the same process? I am having trouble with the steps outlined above. I am brand new to Qualtrics and don't know JS, so I would love very specific, explicit direction if anyone has time.
@LindseyC,
Yes, the same process will work on any page (footers are associate with a page, not a question).
I can't really get much more specific on the instructions. Make sure are in html or source (<>) mode when you edit your question text and footer.
Yes, the same process will work on any page (footers are associate with a page, not a question).
I can't really get much more specific on the instructions. Make sure are in html or source (<>) mode when you edit your question text and footer.
I would like to request, if someone can provide me the screenshot, of each step of code to be placed.
I've tried the above-said steps, nothing worked out.
I've tried the above-said steps, nothing worked out.
Hello. I am having trouble with this as well. I put the text I wanted to hide within the `<div>` code @TomG suggested and added the script to the footer. I then put the `<span>` code into the HTML of a question on the page. But the footer is still showing up.
Here is my footer (in HTML editor view):
~~~~
<div id="hideThis" style="text-align: center;">Footer text</div>
<script>
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
~~~~
Here is how it is embedded in the question (in HTML editor view):
~~~~
Question wording<span id="hideFooterText"></span>
~~~~
But the footer is still showing up on the page with that question. Any suggestions?
Thank you in advance!
Here is my footer (in HTML editor view):
~~~~
<div id="hideThis" style="text-align: center;">Footer text</div>
<script>
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
~~~~
Here is how it is embedded in the question (in HTML editor view):
~~~~
Question wording<span id="hideFooterText"></span>
~~~~
But the footer is still showing up on the page with that question. Any suggestions?
Thank you in advance!
Thanks @TomG , but it's still not working (even on subsequent pages where it may have had a chance to load, if that is the issue). Any other strategies?
If this doesn't work, I can separate and link two separate surveys. I'd just prefer not to do that if I can avoid it because I already have linked surveys in this project.
Thanks again!
If this doesn't work, I can separate and link two separate surveys. I'd just prefer not to do that if I can avoid it because I already have linked surveys in this project.
Thanks again!
> @TheresaA said:
> Thanks @TomG , but it's still not working (even on subsequent pages where it may have had a chance to load, if that is the issue). Any other strategies?
>
> If this doesn't work, I can separate and link two separate surveys. I'd just prefer not to do that if I can avoid it because I already have linked surveys in this project.
>
> Thanks again!
Upon closer inspection, there is a syntax error. It is missing the if:
```
Qualtrics.SurveyEngine.addOnload(function() {
if(jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
```
> Thanks @TomG , but it's still not working (even on subsequent pages where it may have had a chance to load, if that is the issue). Any other strategies?
>
> If this doesn't work, I can separate and link two separate surveys. I'd just prefer not to do that if I can avoid it because I already have linked surveys in this project.
>
> Thanks again!
Upon closer inspection, there is a syntax error. It is missing the if:
```
Qualtrics.SurveyEngine.addOnload(function() {
if(jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
```
Thank you, @TomG! It worked! For the record (in case others are looking at this thread), I put the following in my footer:
~~~
<div id="hideThis" style="text-align: center;">Footer text</div>
<script>
Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
~~~
And then this in a question on each page:
~~~
Question wording<span id="hideFooterText"></span>
~~~
~~~
<div id="hideThis" style="text-align: center;">Footer text</div>
<script>
Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery("#hideFooterText").length > 0) jQuery("#hideThis").hide();
});
</script>
~~~
And then this in a question on each page:
~~~
Question wording<span id="hideFooterText"></span>
~~~
Leave a Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.