Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Search Results (Searched for: html)
- ajparag
20 Mar 2024 05:52
Replied by ajparag on topic Play fullscreen video with no media controls
I have created this HTML page that lets me do exactly what I want. So, it is very much doable.
sprintstudio.ai/media/car/video.html
However, I cannot find a way to incorporate the same in limesurvey.
sprintstudio.ai/media/car/video.html
However, I cannot find a way to incorporate the same in limesurvey.
- Joffm
18 Mar 2024 18:45
Replied by Joffm on topic Can you apply filter on both Subquestions & Answer options in Array type quex
And if you don't have rights to install the plugin
it is sufficient to insert the javascript snippet and the css snippet into your question text.
Like this
css:
Version 6.4.3. Theme: fruity-twentythree
Joffm
it is sufficient to insert the javascript snippet and the css snippet into your question text.
Like this
Code:
<script type="text/javascript" > /* * JavaScript functions to hide empty answers colum in LimeSurvey * This allow using Expression Manager to hide answers in array question type * * @author Denis Chenu <denis@sondages.pro> * @copyright 2013-2015 Denis Chenu <http://sondages.pro> * @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later * @version 2.0 * */ $(document).on('ready pjax:scriptcomplete',function(){ $("table.ls-answers").each(function(){ var basetable=$(this); var fixedtable = $(this).hasClass('table-fixed') || $(this).hasClass('table-responsive'); var countEmpty = 0; var countNotEmpty = 0; $(this).find("thead tr th").each(function(){ var colindex = $(this).parent('tr').find('td,th').index($(this)); if (colindex > 0) { if($.trim($(this).html())==""){ basetable.find('col').eq(colindex).css('width',0); basetable.find('col').eq(colindex).width(0); basetable.find('tr').each(function(){ if(fixedtable) { $(this).find('td,th').eq(colindex).addClass('hideEmptyColumn-hiddencolumn').children().hide(); } else { $(this).find('td,th').eq(colindex).addClass('hideEmptyColumn-hiddencolumn').addClass('hidden-xs').children().hide(); } }); basetable.addClass('hideEmptyColumn-widthhiddencolumn'); countEmpty++; } else { basetable.find('col').eq(colindex).addClass('havewidth'); countNotEmpty++; } } }); if(countEmpty && countNotEmpty && $(this).find('col.col-answers')) { var colanswersWidth = $(this).find('col').attr("style").replace("width:","").replace("%","").replace(";","").trim(); if(!isNaN(colanswersWidth)) { finalWidth = (100 - colanswersWidth)/countNotEmpty; $(this).find('col.havewidth').css("width",finalWidth+"%"); } } }); }); </script>
css:
Code:
<style type="text/css">td.hideEmptyColumn-hiddencolumn,th.hideEmptyColumn-hiddencolumn{ overflow:hidden !important; border-spacing:0 !important; padding:0 !important; width: 0 !important; height: 0 !important; min-width: 0 !important; } td.hideEmptyColumn-hiddencolumn *,th.hideEmptyColumn-hiddencolumn * { display:none; } </style>
Version 6.4.3. Theme: fruity-twentythree
Joffm
- DenisChenu
18 Mar 2024 17:19 - 18 Mar 2024 17:22
It maybe something you can do some years ago, but currently : all good browser disable this for their user.
Browser are done for user not for web designer.
For video : google chrome disable the autoplay feature. You can add autoplay : it don't work (still work on firefox, but surely not for a long time).
See : developer.mozilla.org/en-US/docs/Web/HTML/Element/video (autoplay and control, NO way for fullscreen)
Replied by DenisChenu on topic Play fullscreen video with no media controls
It's not a unnecessary comment.Anything that is achievable will be appreciated. Please do not post unnecessary comments.
It maybe something you can do some years ago, but currently : all good browser disable this for their user.
Browser are done for user not for web designer.
For video : google chrome disable the autoplay feature. You can add autoplay : it don't work (still work on firefox, but surely not for a long time).
See : developer.mozilla.org/en-US/docs/Web/HTML/Element/video (autoplay and control, NO way for fullscreen)
- Joffm
15 Mar 2024 17:46
Replied by Joffm on topic Unable to upload the image file in the script
- holch
15 Mar 2024 15:42
Unable to upload the image file in the script was created by holch
Could you explain your issue better?
I don't understand.
Where do you try to upload an image?
And what does "upload through HTML" mean?
I don't understand.
Where do you try to upload an image?
And what does "upload through HTML" mean?
- L.Nolte
14 Mar 2024 10:55
Videoeinbettung in Version 3.23.1+200825 was created by L.Nolte
Ihre LimeSurvey-Version: [Version 3.23.1+200825]
LimeSurvey-Cloud: Universität
Genutzte Designvorlage: fruity
==================
Liebes Forum,
ich habe Schwierigkeiten bei der Integration von Videos für meine Promotion. Ich stehe auch schon in Kontakt mit dem Administrator, jedoch erfolglos. Ich habe auch eine private Version erstellt, wo das Einfügen problemlos funktioniert.
Mein Vorgehen dort:
1. Youtube Video mittels URL einfügen, dann erscheint das IFRAME Symbol in der gewünschten Größe (Info: auch über das IFRAME Symbol in der Spalte ebenfalls möglich)
2. Quellcode: alles leeren, bis auf die Frage, dann Embed Code des Videos einfügen
Dann sehe ich weiterhin nur das IFRAME Symbol nach dem Speichern aber bei der Fragenvorschau sehe ich das Video, kann dieses manuell anklicken zum starten. Auch nach mehrmaligem Öffnen kein Problem.
Nun zu der Cloud Version der Uni:
1. s.o. (Info: auch wenn ich hier schon auf Speichern klicke, erscheint in der nächsten Ansicht das IFRAME Symbol nicht mehr, obwohl es zuerst eingefügt wurde)
2. hier der Code nach dem Klicken auf das Quellcode-Fenster (genauen Link mit XX geändert)
<p><iframe align="middle" frameborder="0" height="400" scrolling="no" src=" www.youtube.com/shorts/XX?feature=share " width="300">
diesen lösche ich und füge den Embed Code des jeweiligen Videos ein:
<iframe width="315" height="560" src=" www.youtube.com/embed/XX " title="V1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen>
3. Speichern
4. Fragenvorschau: alles ist weg, auch im Quellcode Fenster ist nichts gespeichert worden
Laut dem Admin sind meine Rechte nicht eingeschränkt, jedoch müsste es meiner Meinung nach damit zu tun haben, da es mit derselben Ausführung in der neuen/privaten Version ( 6.4.12 ) funktioniert. Wir haben es auch schon so versucht, dass der Admin die Videos in meine Umfrage einfügt. Hier klappt es wohl auch nur hin und wieder, was ja auch schon merkwürdig ist. Dann ist es so, dass das Video eingefügt ist, ich auch wenn ich direkt die Fragenvorschau anklicke das Video sehen und abspielen kann. Wenn ich dann aber in die Frage reingehe und auch wieder rausgehe, dann ist das Video verschwunden, obwohl ich nichts geändert habe.
Über die HTML5 Möglichkeit funktionniert es bei beiden Versionen nicht trotz mp4 Format. Da sehe ich lediglich ein Bild und kann nichts anklicken zum Starten des Videos.
Ich danke Euch für Eure Zeit und Gedanken
Laura
LimeSurvey-Cloud: Universität
Genutzte Designvorlage: fruity
==================
Liebes Forum,
ich habe Schwierigkeiten bei der Integration von Videos für meine Promotion. Ich stehe auch schon in Kontakt mit dem Administrator, jedoch erfolglos. Ich habe auch eine private Version erstellt, wo das Einfügen problemlos funktioniert.
Mein Vorgehen dort:
1. Youtube Video mittels URL einfügen, dann erscheint das IFRAME Symbol in der gewünschten Größe (Info: auch über das IFRAME Symbol in der Spalte ebenfalls möglich)
2. Quellcode: alles leeren, bis auf die Frage, dann Embed Code des Videos einfügen
Dann sehe ich weiterhin nur das IFRAME Symbol nach dem Speichern aber bei der Fragenvorschau sehe ich das Video, kann dieses manuell anklicken zum starten. Auch nach mehrmaligem Öffnen kein Problem.
Nun zu der Cloud Version der Uni:
1. s.o. (Info: auch wenn ich hier schon auf Speichern klicke, erscheint in der nächsten Ansicht das IFRAME Symbol nicht mehr, obwohl es zuerst eingefügt wurde)
2. hier der Code nach dem Klicken auf das Quellcode-Fenster (genauen Link mit XX geändert)
<p><iframe align="middle" frameborder="0" height="400" scrolling="no" src=" www.youtube.com/shorts/XX?feature=share " width="300">
diesen lösche ich und füge den Embed Code des jeweiligen Videos ein:
<iframe width="315" height="560" src=" www.youtube.com/embed/XX " title="V1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen>
3. Speichern
4. Fragenvorschau: alles ist weg, auch im Quellcode Fenster ist nichts gespeichert worden
Laut dem Admin sind meine Rechte nicht eingeschränkt, jedoch müsste es meiner Meinung nach damit zu tun haben, da es mit derselben Ausführung in der neuen/privaten Version ( 6.4.12 ) funktioniert. Wir haben es auch schon so versucht, dass der Admin die Videos in meine Umfrage einfügt. Hier klappt es wohl auch nur hin und wieder, was ja auch schon merkwürdig ist. Dann ist es so, dass das Video eingefügt ist, ich auch wenn ich direkt die Fragenvorschau anklicke das Video sehen und abspielen kann. Wenn ich dann aber in die Frage reingehe und auch wieder rausgehe, dann ist das Video verschwunden, obwohl ich nichts geändert habe.
Über die HTML5 Möglichkeit funktionniert es bei beiden Versionen nicht trotz mp4 Format. Da sehe ich lediglich ein Bild und kann nichts anklicken zum Starten des Videos.
Ich danke Euch für Eure Zeit und Gedanken
Laura
- blacho
13 Mar 2024 21:14
Funciones adicionales en Matriz(Textos) was created by blacho
Ayúdenos a ayudarle y rellene los siguientes campos:.
Su versión de LimeSurvey: 6.2.11
Servidor propio o LimeSurvey Cloud:
Plantilla de diseño utilizada: ¡fruity
==================
Quiero saber como agregar las siguientes funciones a mis casillas de respuestas de una matriz:
1. Quiero que en la casilla "DESCRIPCION DE NO CONFORMIDAD", como es un campo para esribir bastante texto, que cuando el usuario le de click a esa casilla se abra en la misma pagina una ventana emergente de un editor de texto html o solo de texto. Que visualmente sea asi:
2. Que en la casilla de hora, el usuario le de click y le despliegue un reloj simple para marcar la hora.
Mi archivo lss es este:
Su versión de LimeSurvey: 6.2.11
Servidor propio o LimeSurvey Cloud:
Plantilla de diseño utilizada: ¡fruity
==================
Quiero saber como agregar las siguientes funciones a mis casillas de respuestas de una matriz:
1. Quiero que en la casilla "DESCRIPCION DE NO CONFORMIDAD", como es un campo para esribir bastante texto, que cuando el usuario le de click a esa casilla se abra en la misma pagina una ventana emergente de un editor de texto html o solo de texto. Que visualmente sea asi:
2. Que en la casilla de hora, el usuario le de click y le despliegue un reloj simple para marcar la hora.
Mi archivo lss es este:
- DenisChenu
13 Mar 2024 09:06
Et puis « 2. Contenu dans le champs dédié équation : {TOKEN:LASTNAME}» sur mon premier message
Replied by DenisChenu on topic Afficher la valeur de l'attribut dans l'export des réponses
Le truc equation existe depuis des années, super pratique : pas d'éditeur HTML qui casse tout, pas de XSS au besoin, le même pour toutes les langues, etc …Ah ok, je mettais directement l'équation dans l'intitulé de la question.
TOP, merci Denis, t'es un chef !
Et puis « 2. Contenu dans le champs dédié équation : {TOKEN:LASTNAME}» sur mon premier message
- DenisChenu
12 Mar 2024 16:13
Replied by DenisChenu on topic Maintenance mode plugin of Denis Chenu
Thanks ![:) :)](/media/kunena/emoticons/1.png)
But warning : not tested on 6.X : gitlab.com/SondagesPro/coreAndTools/maintenanceMode
Since 6.X didn't have same HTML than 5X : can be complex …
![:) :)](/media/kunena/emoticons/1.png)
But warning : not tested on 6.X : gitlab.com/SondagesPro/coreAndTools/maintenanceMode
Since 6.X didn't have same HTML than 5X : can be complex …
- goirigolzarri
08 Mar 2024 12:31
Replied by goirigolzarri on topic Ventanas emergentes en preguntas
- goirigolzarri
07 Mar 2024 12:25
Ventanas emergentes en preguntas was created by goirigolzarri
Ayúdenos a ayudarle y rellene los siguientes campos:.
Su versión de LimeSurvey: [Versión 3.17.17+190918]
Servidor propio o LimeSurvey Cloud: Servidor propio
Plantilla de diseño utilizada: Personalizada
==================
Necesito añadir una ventana emergente en una de las preguntas que muestre una tabla con información añadida, por si los usuarios tienen alguna duda, puedan consultarla.
Con esta versión de LimeSurvey no consigo añadir el código html y que funcione.
¿Como podría crearla?
¡Gracias!
Su versión de LimeSurvey: [Versión 3.17.17+190918]
Servidor propio o LimeSurvey Cloud: Servidor propio
Plantilla de diseño utilizada: Personalizada
==================
Necesito añadir una ventana emergente en una de las preguntas que muestre una tabla con información añadida, por si los usuarios tienen alguna duda, puedan consultarla.
Con esta versión de LimeSurvey no consigo añadir el código html y que funcione.
¿Como podría crearla?
¡Gracias!
- DenisChenu
07 Mar 2024 10:59
Maybe it can done, but it stay HTML … then order of element can not be updated easily … We follow the order of the element in both condition.
Replied by DenisChenu on topic Problems with array of numbers (checkbox layout) when viewed on small screen
Create a feature request, or create a QuestionThemeI don't know if this works in V6 or not but I think it's something Limesurvey needs.
Maybe it can done, but it stay HTML … then order of element can not be updated easily … We follow the order of the element in both condition.
- HorizonsMolBio
07 Mar 2024 00:10 - 24 Mar 2024 17:52
Replied by HorizonsMolBio on topic Conditional basic admin notifications
Thank you very much, tpartner and holch! This works perfectly fine ![:) :)](/media/kunena/emoticons/1.png)
I hope you don't mind if I put your answers into a step-by-step solution for future inexperienced users with the same problem (as I as a complete LimeSurvey-newbie had some initial troubles to understand what exactly you mean)?
1.) Create question of the type "equation", activate "always hide this question" in its "Display" settings
2.) Put text to be used in the notification into the field "Question" of the question
3.) Repeat steps 1-2 for every text-element that you want to use in your notification
4.) Reference the hidden question(s) in the notification email template using an expression script (i.e. question code in curly brackets). Here, you can also enter the conditions that define whether a certain text-element should be shown in the notification.
Example: {(if question1.NAOK == "Y", textelement.question)}, with 'question1' defining whether the text-element should be shown, 'textelement' being the text put into the "Question" field of the equation, and the suffix '.question' making sure that the HTML formatted text-element instead of the unformatted text is used in the notification.
![:) :)](/media/kunena/emoticons/1.png)
I hope you don't mind if I put your answers into a step-by-step solution for future inexperienced users with the same problem (as I as a complete LimeSurvey-newbie had some initial troubles to understand what exactly you mean)?
1.) Create question of the type "equation", activate "always hide this question" in its "Display" settings
2.) Put text to be used in the notification into the field "Question" of the question
3.) Repeat steps 1-2 for every text-element that you want to use in your notification
4.) Reference the hidden question(s) in the notification email template using an expression script (i.e. question code in curly brackets). Here, you can also enter the conditions that define whether a certain text-element should be shown in the notification.
Example: {(if question1.NAOK == "Y", textelement.question)}, with 'question1' defining whether the text-element should be shown, 'textelement' being the text put into the "Question" field of the equation, and the suffix '.question' making sure that the HTML formatted text-element instead of the unformatted text is used in the notification.
- holch
05 Mar 2024 17:24
Replied by holch on topic Inserting an image using TOKEN:ATTRIBUTE
You did not look at my example in the necessary depth.
Do you notice something? There is " and there is '. You can't use " in both parts, within the expression and within the HTML code, as the second " will always end this part of the expression. So you need to use ' instead of " for the image source, etc. within the html tags.
Also, your URL is not complete. This might cause another issue later.
Something like this should do the trick:
When you post code, please always try to use the code tags, that makes it easier to read your code.
Code:
{if(TOKEN:ATTRIBUTE_1=="Y","<img src='yourimageurl' />", "")}
Do you notice something? There is " and there is '. You can't use " in both parts, within the expression and within the HTML code, as the second " will always end this part of the expression. So you need to use ' instead of " for the image source, etc. within the html tags.
Also, your URL is not complete. This might cause another issue later.
Something like this should do the trick:
Code:
{if(TOKEN:ATTRIBUTE_1 == "Y", "<img src=' https://sspgsurveyprd.ethz.ch/upload/surveys/866522/images/BEISPIEL.png ' />", "")}
When you post code, please always try to use the code tags, that makes it easier to read your code.
- Joffm
05 Mar 2024 13:27
Replied by Joffm on topic input on demand remove line
You can use the "varLengthArray" script.
[
attachment=39611]a2a.PNG[/attachment]
Adapt to your needs.
Joffm
[
attachment=39611]a2a.PNG[/attachment]
Code:
<script> $(document).ready(function() { // A function to add or remove rows of an "multiple short text" question function varLengthArray(qID) { if ($('#question'+qID+'').length > 0) { // The HTML content of the Add/Remove elements - modify as you wish var addContent = '[+] Add row'; var removeContent = '[-] Remove row'; // Create the Add and Remove elements & insert them // Adjust colors by using other bootstrap classes // „btn-primary“, „btn-success“, „btn-info“, „btn-warning“, „btn-danger“ var el1 = document.createElement('div'); el1.setAttribute('id','addButton'+qID); el1.setAttribute('class','btn btn-success'); document.body.appendChild(el1); var el2 = document.createElement('div'); el2.setAttribute('id','removeButton'+qID); el2.setAttribute('class','btn btn-danger'); document.body.appendChild(el2); // Move them to after the array $( 'div#addButton'+qID ).appendTo($( '#question' + qID + ' ul.ls-answers' ).parent()); $( 'div#removeButton'+qID ).appendTo($( '#question' + qID + ' ul.ls-answers' ).parent()); // Insert their HTML $( 'div#addButton'+qID ).html( addContent ); $( 'div#removeButton'+qID ).html( removeContent ); // Style the elements - you can modify here if you wish $( 'div#addButton'+qID ).css({ 'margin':'10px 0 10px 10px', 'padding':'1px', 'text-align':'center', 'width':'auto', 'cursor':'pointer', 'float':'left' }); $( 'div#removeButton'+qID ).css({ 'margin':'10px 0 10px 10px', 'padding':'1px', 'text-align':'center', 'width':'auto', 'cursor':'pointer', 'float':'left' }); // Initially hide the Remove element $( 'div#removeButton'+qID ).hide(); // Call the functions below when clicked $( 'div#addButton'+qID ).click(function (event) { addRow(qID); }); $( 'div#removeButton'+qID ).click(function (event) { removeRow(qID); }); // Function to add a row, also shows the Remove element and hides the //Add element if all rows are shown function addRow(qID) { var arrayRow = '#question' + qID + ' ul.ls-answers li.answer-item'; var rowCount = $( arrayRow ).size() - 1; $( arrayRow + '[name="hidden"]:first' ).attr('name', 'visible').show(); $( 'div#removeButton'+qID ).show(); if ( $( arrayRow + ':eq(' + rowCount + ')' ).attr('name') == 'visible' ) { $( 'div#addButton'+qID ).hide(); } } // Function to remove a row, also clears the contents of the removed row, // shows the Add element if the last row is hidden and hides the Remove // element if only the first row is shown function removeRow(qID) { var arrayRow = '#question' + qID + ' ul.ls-answers li.answer-item'; var rowCount = $( arrayRow ).size() - 1; $( arrayRow + '[name="visible"]:last input[type="text"]' ).val(''); $( arrayRow + '[name="visible"]:last' ).attr('name', 'hidden').hide(); $( 'div#addButton'+qID ).show(); if ( $( arrayRow + ':eq(1)' ).attr('name') == 'hidden' ) { $( 'div#removeButton'+qID ).hide(); } } // Just some initialization stuff var arrayRow = '#question' + qID + ' ul.ls-answers li.answer-item'; var rowCount = ''; // Initially hide all except first row or any rows with populated inputs $( arrayRow ).each(function(i) { if ( i > 0 ) { // We also need to give the hidden rows a name cause IE doesn't // recognize jQuery :visible selector consistently $( this ).attr('name', 'hidden').hide(); $('input[type=text]', this).each(function(i) { if ($(this).attr('value') != '') { $(this).parents('tbody:eq(0)').attr('name', 'visible').show(); $( 'div#removeButton'+qID ).show(); } }); rowCount = i; } }); } } // Call the function with a question ID varLengthArray({QID}); }); </script>
Adapt to your needs.
Joffm