Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Adjust the text for 'expired survey' screen

More
2 years 5 months ago #260518 by evhenii_access
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud Version 6.5.3  
Own server or LimeSurvey hosting:  LimeSurvey hosting
Survey theme/template: Bootswatch
==================
 Hi, I’m looking for ways to customize the text to be shown to participants after the survey is expired. Could you please help me to identify the screen / screen part file in the Theme Editor where this text is located.

Please Log in to join the conversation.

More
2 years 5 months ago - 2 years 5 months ago #260531 by tpartner
Something like this in layout_errors.twig:

Code:
{# We register a specific css file for that layout. #} {{ registerTemplateCssFile('css/errors.css') }} {% set aError = aSurveyInfo.aError %} {##### CUSTOM ERRORS ####} {% set customErrorTitle = aError.title %} {% set customErrorMessage = aError.message %} {% if aError.type == "survey-expiry" %} {% set customErrorTitle = '<p class=" text-danger inherit-sizes" role="alert">CUSTOM TITLE</p>' %} {% set customErrorMessage = '<p>Custom error message for expired survey!</p>' %} {% endif %} <!DOCTYPE html> <html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}" class="{{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} {{ aSurveyInfo.class.html }}" {{ aSurveyInfo.attr.html }} xmlns="https://www.w3.org/1999/html"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title> {% if aError.error %} {{ aError.error }} {% else %} Error {{ aSurveyInfo.surveyls_title }} {% endif %} </title> <meta name="generator" content="LimeSurvey https://www.limesurvey.org"/> {% if(imageSrc('./files/favicon.ico')) %} <link rel="shortcut icon" href="{{ imageSrc('./files/favicon.ico') }}"/> {% endif %} </head> <body class="{{ aSurveyInfo.class.body }} lang-{{ aSurveyInfo.languagecode }} {{ surveyformat }}" marginwidth="0" marginheight="0" {{ aSurveyInfo.attr.body }}> <div class="container"> <div id="error-card" class="card w-75 mt-6 mb-0 mx-auto"> <div class="card-body"> <h2 class="card-title"> {% if aError.error %} {{ aError.error }} {% endif %} {{ customErrorTitle }} </h2> <hr> <div class="card-text">{{ customErrorMessage }}</div> {% if aError.contact %} {{ aError.contact }} {% else %} {{ gT("For further information please contact %s:")|format (aSurveyInfo.admin) }} {% if aSurveyInfo.adminemail %} <br> <a class="card-link" href='mailto:{{ aSurveyInfo.adminemail }}'>{{ aSurveyInfo.adminemail }}</a> {% endif %} {% endif %} {% if aError.trace is not empty %} <pre> {{ aError.trace }} </pre> {% endif %} </div> </div> </div> {% block footer %} {{ include('./subviews/footer/footer.twig') }} {% endblock %} </body> </html>


 

Attachment not found


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 5 months ago by tpartner.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartner, holch

Lime-years ahead

Online-surveys for every purse and purpose