如何在 Limesurvey 中添加自定义文本元素?

How to add custom text elements in Limesurvey?

默认情况下,Limesurvey 为调查提供了以下文本元素 - 调查标题、描述、欢迎消息、结束消息等,我可以在我的模板中使用标签,如 {SURVEYNAME}{SURVEYDESCRIPTION}, {WELCOME}

是否可以添加我自己的自定义字段,然后我可以在模板中使用它?我需要这样做,因为我需要让文本可翻译,并出现在每一页上。

您不能使用当前版本的 LimeSurvey 添加自定义替换。而且您的 LimeSurvey 版本似乎已过时。但是 LS 包括 jquery,因此很容易将一些元素从一个地方移动到其他地方。

快速示例:

<p>Here is your description</p>
<div style='display:none'>
<label for='languagechanger' id='labellang'>Here is the new label for language</label>
</div>
<script>
$(function() {
  $("#labellang").insertAfter("#languagechanger")
});
</script>

一个 PHP 解决方案,破解 LimeSurvey 代码,应该放在 https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/replacements_helper.php#L814