I have a Qualtrics survey that participants will complete using their cell phones. Based on the question formatting, I would like the survey to be displayed in LANDSCAPE orientation only. Is there a way to set up the survey so that it will automatically be locked in landscape orientation (and will not switch to portrait orientation even if users rotate their phones)?
As fast as I know, there isn’t a native way in Qualtrics to automatically lock the survey in landscape orientation on mobile devices. Most mobile browsers (especially on iOS and Android) don’t allow web pages to force orientation, due to user experience and security policies.
However, a common workaround is to use custom JavaScript to detect the screen orientation and show a message asking the user to rotate their device. Here’s a basic version you can add to your survey (either under Look & Feel → Add Custom JS, or within a question’s JavaScript):
Qualtrics.SurveyEngine.addOnload(function () {
function checkOrientation() {
if (window.innerHeight > window.innerWidth) {
// If in portrait, replace content with prompt
document.body.innerHTML = "<div style='text-align:center; margin-top:30vh; font-size:1.5em;'>Please rotate your phone to landscape mode to continue.</div>";
}
}
checkOrientation();
window.addEventListener("resize", checkOrientation);
});
Hope this helps!
-- Rochak
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.