"Survey not active" message in template

More
3 years 2 months ago #113110 by TonisOrmisson
TonisOrmisson created the topic: "Survey not active" message in template
Can I relocate the message "This survey is currently not active. You will not be able to save your responses."?
I can not seem to locate this in any of the template objects / keywords.

Please Log in to join the conversation.

More
3 years 2 months ago #113143 by tpartner
tpartner replied the topic: "Survey not active" message in template
Hmm...no, that doesn't seem to be wrapped in any container element that you could manipulate.

But why would you need to in an inactive survey?


.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 2 months ago #113154 by TonisOrmisson
TonisOrmisson replied the topic: "Survey not active" message in template
We are using Lime in CATI as well as CAPI projects.
For most jobs we have test-questionnaires in parallel with live questionnaires (so that eg new interviewers can test/learn while others fill the live one). So we make copy of a questionnaire for testing purposes.

We have some cases where interviewers have mixed up - filling test questionnaire thinking its a live one. Its rather a UI issue for our systems and in normal cases it is should not be an issue, but we thought it would be better to have the "survey not active ..." message in header and bigger just to be sure...

What I can do is go into source code and apply an unique id to that <p> and then do css to relocate but obviously I would prefer that i would not need to change source.

I would propose at least to have add an unique id to the message so that it could be manipulated via styles.

Thanks, wonderful project!

Please Log in to join the conversation.

More
3 years 2 months ago #113170 by Ben_V
Ben_V replied the topic: "Survey not active" message in template
try to paste the following css code at the end of your template.css file
p[style='text-align:center'][class='error'] { position:fixed;top:1px;right:1px;font-weight:bold}

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: TonisOrmisson

Please Log in to join the conversation.

More
3 years 2 months ago #113171 by tpartner
tpartner replied the topic: "Survey not active" message in template

...we thought it would be better to have the "survey not active ..." message in header and bigger just to be sure...

In that case, I would use JavaScript to:
  1. Assign a new distinct class to that <p> element
  2. Insert a clone of it in the header

Note: the following JS and CSS are for the default template and would need to be modified for others.

Add this to the end of template.js
$(document).ready(function(){		
	$('p').filter(function() {
		return $(this).text() == 'This survey is currently not active. You will not be able to save your responses.';
	}).addClass('non-active-message');
 
	if($('p.non-active-message').length > 0) {
		$('td.survey-description').append($('p.non-active-message').clone());
	}
});

Add this to template.css:
.survey-description .non-active-message {
	font-size: 12px !important;
}


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: TonisOrmisson

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!