Welcome to the LimeSurvey Community Forum

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

Add Survey Admin and Email to footer.twig

  • cesa_kerrin
  • cesa_kerrin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago - 4 years 3 months ago #192034 by cesa_kerrin
Add Survey Admin and Email to footer.twig was created by cesa_kerrin
Hi, we would like to add the Survey Admin's name and email address in the footer so that it is displayed for all surveys.

Tried copying this from the SurveyList page, but it does not work in the footer.
Code:
{{ sprintf( gT("Please contact %s ( %s ) for further assistance."), aSurveyInfo.sSiteAdminName, aSurveyInfo.sSiteAdminEmail ) }}

What am I missing? Do I need to reference the survey object somewhere?

We are using Version 3.18.0+190923.

Thanks,

Kerrin
Last edit: 4 years 3 months ago by cesa_kerrin.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #192050 by tpartner
Replied by tpartner on topic Add Survey Admin and Email to footer.twig
You can access those directly in the aSurveyInfo array or with Expression manager placeholders.

Via the aSurveyInfo array:

Code:
{{ aSurveyInfo["admin"] }} - <a href="mailto:{{ aSurveyInfo["adminemail"] }}">{{ aSurveyInfo["adminemail"] }}</a>

Via the Expression manager placeholders:

Code:
{{ processString('{ADMINNAME}') }} - <a href="mailto:{{ processString('{ADMINEMAIL}') }}">{{ processString('{ADMINEMAIL}') }}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #192054 by DenisChenu
Replied by DenisChenu on topic Add Survey Admin and Email to footer.twig
I think @cesa_kerrin want to access the global setting, i don't think it's available (there are a feature request)

Else aSurveyInfo["adminemail"] work ? It's not aSurveyInfo.adminemail ?

Me must learn twig ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago - 4 years 3 months ago #192055 by tpartner
Replied by tpartner on topic Add Survey Admin and Email to footer.twig

I think @cesa_kerrin want to access the global setting

The OP says "we would like to add the Survey Admin's name and email address". :)

Else aSurveyInfo["adminemail"] work ? It's not aSurveyInfo.adminemail ?

Both work.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 3 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #192057 by DenisChenu
Replied by DenisChenu on topic Add Survey Admin and Email to footer.twig

tpartner wrote:

Else aSurveyInfo["adminemail"] work ? It's not aSurveyInfo.adminemail ?

Both work.

Great,

Maybe make twig improvment for question more easily :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose