Hello all,
We are trying to clone our Next/Previous buttons to the top and bottom of our survey but are running into issues with the New Survey Experience.
We are referencing this post and this post to clone those buttons but the present code does not apply when using the NSE.
We switched the existing survey back to the older style and the CSS/script for the header worked instantly so we assume it is how the NSE is interpreting the script.
Has anyone been able to do this with the New Survey Experience?
We appreciate any and all help!
Thanks all!
Moving Next Button to the Top of Survey - New Survey Experience
Best answer by Tom_1842
Hi
<script>
Qualtrics.SurveyEngine.addOnReady(function() {
var that = this;
// Hide the header-container
document.getElementById('header-container').style.display = 'none';
// Clone the navigation div
var buttons = document.getElementById('navigation').cloneNode(true);
// Add a class to the cloned navigation div
buttons.classList.add('cloned-navigation');
// Place the cloned navigation div under survey-canvas
var surveyCanvas = document.getElementById('survey-canvas');
surveyCanvas.insertBefore(buttons, surveyCanvas.firstChild);
// Click Next Button
document.querySelector('.cloned-navigation #next-button').addEventListener('click', function() {
that.clickNextButton();
document.querySelector('.cloned-navigation #next-button').style.opacity = 0.5;
});
// Check if the previous button exists before clicking Previous Button
var clonedPreviousButton = document.querySelector('.cloned-navigation #previous-button');
if (clonedPreviousButton) {
clonedPreviousButton.addEventListener('click', function() {
that.clickPreviousButton();
document.querySelector('.cloned-navigation #previous-button').style.opacity = 0.5;
});
}
});
// Clear away the cloned navigation on page submit
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var clonedButtons = document.querySelector('.cloned-navigation');
if (clonedButtons) {
clonedButtons.remove();
}
});
</script>
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
