Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: html)

  • NandoK
  • NandoK's Avatar
08 Jan 2024 17:24 - 08 Jan 2024 17:27
Replied by NandoK on topic Edit Theme Crash
i fixed the TemplateManifest.php after i got the same error , if a survey has no description

method --> getDescription

$sDescription = $this->config->metadata->description;

if ($sDescription === null) {
$sDescription = 'no description available';
}

// If wrong Twig in manifest, we don't want to block the whole list rendering
// Note: if no twig statement in the description, twig will just render it as usual
try {
$sDescription = App()->twigRenderer->convertTwigToHtml($sDescription);
} catch (\Exception $e) {


best
regards
Nando
 
  • lea_crtl
  • lea_crtl's Avatar
08 Jan 2024 15:30 - 08 Jan 2024 15:42
You're right, my question codes are A1 and A2... I changed the equation from {if(daltonisme == 'Non', 'std_', 'cb_')} to {if(daltonisme == 'A2', 'std_', 'cb_')} and now the typecartes variable takes the right value. But I'm still unable to load an image using this variable...
My script is:
<script>
<img alt="" height="400" src="/upload/surveys/248689/images/{typecartes}phase1_11.png" />
</script>

EDIT
: I figured out that I don't need to use the <script> flare since this is html code and no JS... Sorry for this beginner mistake and thanks a lot for your help. Everything works smoothly now.
  • michael87
  • michael87's Avatar
05 Jan 2024 11:16
Replied by michael87 on topic Teil eines html Codes später einblenden
Ganz Herzlichen Dank!

Und sorry, nächstes Mal fülle ich alles aus. Eure Arbeit ist unbezahlbar.
  • Joffm
  • Joffm's Avatar
03 Jan 2024 14:04
Replied by Joffm on topic Teil eines html Codes später einblenden
Hallo,
bitte, beantworte die Fragen zu Beginn und lösche sie nicht!
Dies sieht so nach Missachtung unserer Arbeit aus.

Gut, natürlich gibt es eine "elegante" Lösung.
Findest Du in meinem "Tutorial 3: Gimmicks ...", Kap. 2.
Dort geht es zwar um einen Button, aber das Prinzip ist gleich.

Umschließe den ganzen "Entscheidungskram", Überschrift und Tabelle,  mit einem DIV, welches eine ID bekommt.
Ich habe es einmal "tableDiv" genannt.

Dann das script aus dem Tutorial, entsprechend angepasst.
Code:
<script type="text/javascript" charset="utf-8">
      $(document).ready(function(){
 
            // Verstecke die Entscheidungstabelle
            $('#tableDiv').hide();
 
            setTimeout(function () {
               // Zeige die Entscheidungstabelle
               $('#tableDiv').show()
          }, 10000);  // Nach 10 Sekunden, Wert ist in Millisekunden
    });
</script>





Joffm
 
  • michael87
  • michael87's Avatar
03 Jan 2024 11:28
Teil eines html Codes später einblenden was created by michael87
Guten Tag und frohes neues Jahr,

ich habe zwei Tabellen. Ich hätte gerne, dass die erste (siehe Ausgangssituation) für 10 Sekunden angezeigt wird, bevor die zweite (siehe Entscheidungssituation) erscheint.

Eine Möglichkeit ist sicher, die Ausgangssituation mit einer Einfachantwort zu versehen, sowas wie "Ausgangssituation verinnerlicht" und dann über die Teilfragenrelevanz den zweiten Teil einzublenden. Allerdings ist das ein Klick mehr und wenn die beiden Tabellen auf zwei Frageseiten innerhalb einer Gruppe sind, vergrößert sich deren Abstand und die Teilnehmer müssen immer scrollen um nochmal einen Blick auf die Ausgangssituation zu werfen.

Die andere Möglichkeit ist denke ich, die Ausgangssituation in eine extra Gruppe zu machen und über einen automatischen Weiter-Button zur nächsten Gruppe zu springen, wo dann Ausgangssituation und Entscheidungssituation gemeinsam sind. Das ist aber ziemlich aufwendig.

Also vielleicht gibts ja noch ne elegante Lösung.

Vielen Dank im Voraus
Michael
  • DenisChenu
  • DenisChenu's Avatar
22 Dec 2023 18:22 - 22 Dec 2023 18:24
Replied by DenisChenu on topic A
Je passe toujours en mode HTML en popup.

Mais sinon : c'est pour poser un lien texte ?

Tu peux utiliser @@SURVEYURL@@ pour donner le lien brut.

Je viens de voir que j'ai un bogue : j'ai utilisé %%SURVEYURL%% au lie de @@SURVEYURL@@

Donc
Code:
<a href="%%SURVEYURL%%">Cliquez ici</a>

manual.limesurvey.org/Email_templates#Email_Placeholders
  • Reynald
  • Reynald's Avatar
22 Dec 2023 17:44
Replied by Reynald on topic A
Re Bonjour Denis,

J'essaye d'encapsuler la balise {SURVEYURL} dans le modèle de courriel et mettre dans un bout de texte pour masquer l'Url mais pas facile en mode HTML et même avec le module Lien de la barre d'outils, est-ce normal ?

Une idée ?

Merci d'avance

Reynald
  • DenisChenu
  • DenisChenu's Avatar
21 Dec 2023 11:23
Replied by DenisChenu on topic Populate CPDB from another database table
Not,
Just unique and avoid space : developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id

About start by number : maybe it's OK now ?
Or start by # (and jquery didn't like #)
  • DenisChenu
  • DenisChenu's Avatar
21 Dec 2023 08:56
Replied by DenisChenu on topic Populate CPDB from another database table
One of my customers fills it in with the identifier of his other database.
Warning: it must be a unique code attached to this participant, and as this code is used in HTML as an id: it must not start with a number (breaks the JS).
  • DenisChenu
  • DenisChenu's Avatar
21 Dec 2023 08:37
Replied by DenisChenu on topic Import users via csv - error

Thanks a lot if you can, or if you have any example!
 
The webserver auth plugi is an example.

Just use $_SESSION in place of $_SERVER.

But : yes, need to develop PHP : contact a PHP developer maybe.
Else : www.sondages.pro/contact.html
  • mahi_123
  • mahi_123's Avatar
15 Dec 2023 08:52
Please help us help you and fill in where relevant:

can I send a PDF (which consists of their level of digital maturity assessed during the survey)/An HTML template/an Output generated by the Equation to the participants after completing the survey through email?
 
  • Joffm
  • Joffm's Avatar
14 Dec 2023 09:15
Replied by Joffm on topic Transport & Moving-services
Again I checked, this time in "vanilla".
The same result. Everything's fine.
   



With these scripts

HTML:
Code:
<button class="btn btn-lg btn-danger" data-bs-content="And here's some amazing content. It's very engaging. Right?" data-bs-toggle="popover" title="Popover title" type="button">
  Click to toggle popover
</button>
 
<a class="btn btn-lg btn-danger" data-bs-content="And here's some amazing content. It's very engaging. Right?" data-bs-toggle="popover" data-bs-trigger="focus" role="button" tabindex="0" title="Dismissible popover">
  Dismissible popover
</a>
 
<a data-bs-content="And here's some amazing content. It's very engaging. Right?" data-bs-toggle="popover" data-bs-trigger="hover focus" role="button" tabindex="0" title="A text with popover">
  Hover shows it
</a>

JS to initialize the popover
Code:
<script>
$(function () {
  $('[data-bs-toggle="popover"]').popover();
});
</script>

And some css to align and color the header
Code:
<style type="text/css">
.popover-header {
    margin-top:0;
    color:maroon;
    background-color: yellow;
}
</style>

Waiting for your lss export.

Joffm
  • dqzhou
  • dqzhou's Avatar
13 Dec 2023 19:15
Transport & Moving-services was created by dqzhou
Please help us help you and fill where relevant:
Your LimeSurvey version: [6.0]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,

I met the problem when my Limesurvey updated from 3.0 to 6.0.

My JavaScript codes about clickable words are ineffective after updating. The codes that could be used in 3.0 is:

"
<span style="font-size:15px"><span style="color:black"><a data-content="If the transport mode of the first leg is private vehicle or shared vehicle, the amount of detour riding time for pick-up will be shown in the choice task." data-html="true" data-placement="top" data-bs-toggle="popover" data-bs-trigger="focus hover" role="button" tabindex="0" title="Detour riding time for pick-up">Detour riding time for pick-up</a> <font color="#333333"><script>
$('[data-bs-toggle="popover"]').popover();
$('[data-bs-toggle="tooltip"]').tooltip();
</script></span></span>"

After version update, the word cannot be clickable. I check the code, it is correct. If you still have the version 3.0, you could see the illustration of this code. 

I also try some code about clickable function in Version 6.0, "<span style="font-size:15px"><span style="color:black"><a href="#" title="If the transport mode of the last leg is private vehicle or shared vehicle, the amount of detour riding time for pick-up will be shown in the choice task.">Detour riding time for pick-up</a> <font color="#333333">". This code can be used in Version 6.0, which don't need to click it. But it need to put the cursor over the word and waiting for seconds, then the explainable words will be shown. It is not convenient to let the people wait for it. 

I may request to let the original code effective. I think it is the problem about the version update instead of Java code. So I write this post to ask for an answer. Thank you very much!

Best regards.
dqzhou
  • terryaulenbach
  • terryaulenbach's Avatar
12 Dec 2023 19:14 - 12 Dec 2023 19:23
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.44+231107
Own server or LimeSurvey hosting: own server
Survey theme/template: modified vanilla
==================

A few years ago I found some code (see below) here that helped me set up a Date/Time question that only allows certain dates to be selected (every Wed except certain holidays). For the most part, it works. I also use Expression Manager to set the Minimum Date to 2 weeks out [date("Y-m-d", strtotime("today") + 14 * 60 * 60 * 24)]. The problem is that when the Minimum Date falls on a day that is blocked by the code, it automatically gets filled in and can be submitted. If you click on the calendar icon, the date is blocked and can't be selected. But if you leave it as is, it is accepted. This form is for setting up a date to write an exam and the earliest date should be 2 Weds in the future. We have Dec 27th blocked off as a holiday, but today it gets automagically filled in as the Minimum Date (14 days out). How can I make these 2 things work together?

JavaScript code in the question:

<script type="text/javascript" charset="utf-8">
     $(document).ready(function(){     
          // Disable days of week except Wed
          $('#answer{SGQ}_datetimepicker').data('DateTimePicker').daysOfWeekDisabled([0,1,2,4,5,6]);
          // Disable holidays
          var holidays = ; // Variable holidays
          var futureYears = 1; // Number of years to handle future fixed holidays
          var thisYear = new Date().getFullYear();
          for (i = 0; i < (futureYears+1); i++) {
               holidays.push('01-01-'+(thisYear+i)); // New Years Day
               holidays.push('01-07-'+(thisYear+i)); // Canada Day
               holidays.push('11-11-'+(thisYear+i)); // Remembrance Day
               holidays.push('24-12-'+(thisYear+i)); // Christmas Eve Day
               holidays.push('25-12-'+(thisYear+i)); // Christmas Day
               holidays.push('26-12-'+(thisYear+i)); // Boxing Day
               holidays.push('27-12-'+(thisYear+i)); // University Holiday
               holidays.push('28-12-'+(thisYear+i)); // University Holiday
               holidays.push('29-12-'+(thisYear+i)); // University Holiday
               holidays.push('30-12-'+(thisYear+i)); // University Holiday
               holidays.push('31-12-'+(thisYear+i)); // University Holiday
               holidays.push('20-12-'+(thisYear+i)); // No OA Exams
               holidays.push('21-12-'+(thisYear+i)); // No OA Exams
               holidays.push('22-12-'+(thisYear+i)); // No OA Exams
               holidays.push('23-12-'+(thisYear+i)); // No OA Exams
               holidays.push('02-01-'+(thisYear+i)); // No OA Exams
               holidays.push('03-01-'+(thisYear+i)); // No OA Exams
               holidays.push('04-01-'+(thisYear+i)); // No OA Exams
               holidays.push('05-01-'+(thisYear+i)); // No OA Exams
               holidays.push('06-01-'+(thisYear+i)); // No OA Exams
               holidays.push('07-01-'+(thisYear+i)); // No OA Exams
          }
          $('#answer{SGQ}_datetimepicker').data('DateTimePicker').disabledDates(holidays);
let str = document.getElementById("vmsg_81122_value_range").innerHTML;
let res = str.replace(/Answer must be greater or equal to/g, "You must select the first available date <em>after</em>");
document.getElementById("vmsg_81122_value_range").innerHTML = res;
     });
</script>
  • Joffm
  • Joffm's Avatar
12 Dec 2023 14:02 - 12 Dec 2023 14:06
Hallo,
zunächst gestatte mir die Frage "Warum denn dieses Brimborium?"
Reicht es nicht, die Einwilligung über die "Datanschutzerklärung" einzuholen?

Aber sei's drum.
Du denkst viel zu kompliziert.
Eine eindeutige Identifikation erhältst Du über die SAVEDID; das ist praktisch die laufende Nummer der Antworten.

Also hängst Du diese in der end-url an den Aufruf der zweiten Umfrage, z.B.
Code:
https://www.mysurvey.com/limesurvey/index.php/123456?lang=de&amp;TIC={SAVEDID}


Lass Dich nicht verwirren.
Der Editor macht aus dem kaufmännischen "Und" diese HTML-Darstellung  

Und in der zweiten Umfrage legst Du eine versteckte Frage vom Typ "kurzer Text" mit dem Code "TIC" an.

Das ist alles.

Joffm
Displaying 151 - 165 out of 4774 results.

Lime-years ahead

Online-surveys for every purse and purpose