Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: html)

  • DenisChenu
  • DenisChenu's Avatar
14 Nov 2024 16:16
Replied by DenisChenu on topic PDF report using a PASSWORD
No

Maybe you can use LimMPDF mpdf.github.io/reference/mpdf-functions/setprotection.html
and improve the plugin.
 
  • DenisChenu
  • DenisChenu's Avatar
14 Nov 2024 15:53
Replied by DenisChenu on topic 404 Bad Request : HtmlEditor Pop - invalid url
?
Surprenant !!

Surtout avec du apache, tu as activé le mode debug ? Quelle est l'erreur ? Une erreur apache ? PHP  ? Autre ?
  • martial.couty
  • martial.couty's Avatar
08 Nov 2024 12:59
404 Bad Request : HtmlEditor Pop - invalid url was created by martial.couty
Aidez-nous à vous aider et remplissez les cases appropriées :
Votre version de LimeSurvey :  6.6.6+241002.
Votre propre serveur :   Apache/2.4.57 (Rocky Linux) - PHP Version 8.2.25 - Red Hat Enterprise Linux release 9.4 
Thème : 
htmleditorpop cassé
==================
Url générée du popup : mondomaine.fr/enquetes/index.php/admin/h...ex/name/subquestions [13398][0][subquestionl10n][fr]/text/[Sous-question+:](fr)/type/editanswer/action/editanswer/sid/386372/qid/13398/lang/fr/contdir/ltr/contdir/ltr


Bonjour,
Nous avons récemment mis à jour Limesurvey dans des environnements de qualification et tout fonctionnerait à priori sauf l'édition html en popup servant par exemple pour les sélection d'image à choix multiples ou question à choix multiple.

Il ne reste plus que ce problème afin de basculer la mise à jour en production (version bien obsolète 2.72.5+171121 !).

Merci pour votre aide, j'ai cherché dans les forums anglais/français et je ne trouve rien qui réponde de mon problème
  • DenisChenu
  • DenisChenu's Avatar
04 Nov 2024 12:35 - 04 Nov 2024 12:39
Replied by DenisChenu on topic programatically upload files in answer
I think you need
1. upload files and get the filname
2. Update the json string with api.limesurvey.org/classes/remotecontrol...thod_update_response

EDIT : oh ! you're right : github.com/LimeSurvey/LimeSurvey/blob/59...rol_handle.php#L3460 just upload to temporary dir …

I don't have an answer here.
I move to development. Personnaly, if i need such solutun i create my own RC function … gitlab.com/SondagesPro/RemoteControl/extendRemoteControl
  • Joffm
  • Joffm's Avatar
31 Oct 2024 16:53
Bonjour

Votre script semble exécuter la version 6.x. être incompatible; c'est pour une ancienne version.
Veuillez comparer !
vieux:
Code:
  // 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 = '';


nouveaux:
Code:
          // 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 + ' table.ls-answers tr.subquestion-list';
                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 + ' table.ls-answers tr.subquestion-list';
                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 + ' table.ls-answers tr.subquestion-list';
            var rowCount = '';
 


Voici le script
Code:
$(document).ready(function() {
 
   // A function to add or remove rows of an Array (Multi Flexible)(Text) question
    function varLengthArray(qID) {
        
        if ($('#question'+qID+'').length > 0) {
            
            // The HTML content of the Add/Remove elements - modify as you wish
            var addContent = '[+] Zeile zufügen';
            var removeContent = '[-] Zeile löschen';
 
            // Create the Add and Remove elements & insert them
            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 + ' table.ls-answers' ).parent());
            $( 'div#removeButton'+qID ).appendTo($( '#question' + qID + ' table.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 + ' table.ls-answers tr.subquestion-list';
                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 + ' table.ls-answers tr.subquestion-list';
                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 + ' table.ls-answers tr.subquestion-list';
            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});
 
});
En plus, tu avais oublié ça
$(document).ready(function() {
...
});


 

Joffm

 
  • sugeek
  • sugeek's Avatar
31 Oct 2024 03:39 - 31 Oct 2024 15:08
Telegram Plugin was created by sugeek
Please help us help you and fill where relevant: Telegram Plugin ( github.com/LibreCodeCoop/LSTelegramNotify/tree/main )
Your LimeSurvey version: [5x and 6x]
Own server or LimeSurvey hosting: Own Server
==================
Hi Guys, we are using a Telegram Plugin for Notification, is a great solution for not use Email Notifications, but now, we need receive entire responses into message without pdf, so, we modify the plugin but only we receive questions codes and answers codes now its content. Maybe can help us with this?

We Add this code into sendmessage function, after $text variable definition and before $telegram->sendMensagge:
Code:
// Desde aqui
$response = $this->pluginManager->getAPI()->getResponse($surveyId, $responseId);
$answersText = "";
if ($response) {    
foreach ($response as $questionCode => $answerValue) {
        if (is_array($answerValue)) {
            $answerValue = implode(", ", $answerValue);
        }    
    $answersText .= htmlspecialchars($questionCode) . ": " . htmlspecialchars($answerValue) . "\n";     } }
$text .= "\nRespuestas:\n" . $answersText;
// Hasta aQUI

I receive telegram notification but with question and answers codes without content, for do it same content like email notification?.
Regards, 
  • Joffm
  • Joffm's Avatar
30 Oct 2024 18:31
Replied by Joffm on topic Trouble with relevance equation
Hi,
check your brackets
and check for HTML code in the condition.

Joffm
  • fkrahfori
  • fkrahfori's Avatar
29 Oct 2024 12:55
Replied by fkrahfori on topic Bilder randomisieren
Ok, ich bin Schritt für Schritt nochmal alles durchgegangen, was du geschrieben hast und endlich werden mir die Bilder angezeigt. Juhu!!!
Aber Ich habe noch eine Frage:
den Code: <img src="/upload/surveys/696798/images/BildL{substr(QPool_1 ,0, 2)}.jpg" /> <img src="/upload/surveys/696798/images/BildR{substr(QPool_2 ,0, 2)}.jpg" /><img src="/upload/surveys/696798/images/BildL{substr(QPool_1,2, 2)}.jpg" /> <img src="/upload/surveys/696798/images/BildR{substr(QPool_2,2, 2)}.jpg" /> <img src="/upload/surveys/696798/images/BildL{substr(QPool_1,4, 2)}.jpg" /> <img src="/upload/surveys/696798/images/BildR{substr(QPool_2,4, 2)}.jpg" />

Gebe ich ja als HTML in den Teilfragen ein (der MAtrix), richtig?
Aber da reicht für eine Teilfrage einer dieser Codes also <img src="/upload/surveys/696798/images/BildL{substr(QPool_1 ,0, 2)}.jpg" />
Bspw. Für Teilfrage 1.

Jetzt habe ich nur das Problem, dass die Bilder untereinander angezeigt werden und quasi jeweils bewertet werden würden in der Matrix. Wie kann ich es lösen, dass es wie bei dir auf dem Bild aussieht?

Liebe Grüße
  • stevelegare
  • stevelegare's Avatar
24 Oct 2024 22:41
How to translate em_manager_helper.php was created by stevelegare
Your LimeSurvey version: LimeSurvey Community Edition Version 6.6.6+241002
Own server or LimeSurvey hosting: Own
==================
Hello,

We have noticed that in the file application/helpers/expressions/em_manager_helper.php, not all validation messages are translated.

For example, there is an untranslated message:

sprintf('Could not convert date %s to format %s. Please check your date format settings.', self::htmlSpecialCharsUserValue(trim($value)), $aDateFormatData);

And here is a translated message:

sprintf($LEM->gT('Invalid question - probably missing subquestions or language-specific settings for language %s'), $_SESSION);

How can we translate these code snippets for users who do not speak English?

Thank you.
 
  • ketzunouka
  • ketzunouka's Avatar
21 Oct 2024 03:56 - 21 Oct 2024 03:59
Thanks for the reply, I've tried to update from LimeSurvey 2.50+  (current `dbversionnumber` is 258) as your recommendation to 3  github.com/SondagesPro/LimeSurvey-SondagesPro/tree/3.x-LTS  (target `dbversionnumber` is 366) but i encountered an error on database upgrade 

CDbCommand failed to execute the SQL statement: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "boxes_pkey"
DETAIL: Key (id)=(1) already exists.. The SQL statement executed was: INSERT INTO "boxes" ("position", "url", "title", "ico", "desc", "page", "usergroup") VALUES (:position, :url, :title, :ico, :desc, :page, :usergroup)


I tried the update from console (accessing the /admin page after changing the LimeSurvey files except the config.php) and also from CLI with `php console.php updatedb` command.

root@a007fddcb785:/var/www/html/application/commands# php console.php updatedb
Update pgsql:host=postgresql;port=5432;user=postgres;password=mysecretpwd;dbname=limesurpei; with prefix : from 258 to 366
exception 'CException' with message 'Please fix this error in your database and try again' in /var/www/html/application/commands/UpdateDbCommand.php:49
Stack trace:
#0 /var/www/html/framework/console/CConsoleCommandRunner.php(71): UpdateDBCommand->run(Array)
#1 /var/www/html/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#2 /var/www/html/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#3 /var/www/html/application/commands/console.php(70): CApplication->run()
#4 {main}


I know it's a common error, the error is likely because it's trying to insert a row with an id value that already exists in the boxes table, but how to resolve this issue in LimeSurvey scenario ?

In addition, i've also tried to update from LimeSurvey 2.50+  (current `dbversionnumber` is 258) to version 6.6.6 (target `dbversionnumber` is 623), and i got the same error. But, i noticed that the current db version from my LimeSurvey 2.50+ has changed from 258 to 337. I attach the screnshoot for this case. Any suggestions for this issue ? I think the problem starts from dbversionnumber 337.

Thankyou 

 

 
  • jambouz
  • jambouz's Avatar
18 Oct 2024 15:22
Hello,

I upgraded Lime Survey from version 5.3.32 to version 6.6.5 that is hosted in Azure Web App Service, everything was fine at the end. I have just a problem clearing the cache. I tried the two possible methods:
  • Using the built-in Lime Survey feature "Clear assets cache" button: this method in every try caused the time out of the application and when connected again, the number after the button "Clear assets cache" is incremented by 1 each time.
  • Clearing the cache manually: connecting to the Server and clear the ~/site/wwwroot/tmp/assets folder only the index.html file remains. When I used this method  and I cleared manually all folders in assets, other new folders appeared in assets each time. Also, when I tried to connect to Lime Survey application, the number after the "Clear assets cache" button stayed the same (didn't change).

I did this upgrade in two different environments and I had the same issue.

Thank you very much for your help.
  • Joffm
  • Joffm's Avatar
17 Oct 2024 15:53
Replied by Joffm on topic Bildauswahl Multiple Choice
Ja, ja,
das ist ein gerne gemachter Fehler.
In die Teilfrage wird nicht ein HTML-Code zur Anzeige eines Bildes (<a href=" src="...) eingetragen; hier müsste es sowieso "<img src="..."/> heißen.
Dies würdest Du benutzen müssen, wenn es eine "normale" Mehrfachnennungsfrage sein soll
 
Dann ist die Checkbox davor.

Aber dieser Fragetyp erwartet ja Bilder.
Also wird NUR der Pfad zum Bild eingetragen.
 

 

Joffm

 
  • mate007
  • mate007's Avatar
16 Oct 2024 23:01
Bitte helfen Sie uns, Ihnen zu helfen und füllen Sie folgende Felder aus:
Ihre LimeSurvey-Version: LimeSurvey Community Edition
                                            Version 5.6.17+230426
Eigener Server oder LimeSurvey-Cloud: könnte eignener Server sein
Genutzte Designvorlage: inherit
==================
Leider haben sich meine Datenschutzbestimmungen heute wieder geändert, sodass ich meine Umfrage erneut umgestalten muss.

Aufgabe:
Der User muss sich mit einer Email und mit einer Betriebsnummer anmelden.
Danach bekommt der User die EMail zugesandt und kann die Umfrage per Link öffnen.
Hierfür nutze ich die Funktion "self-registration" oder in Deutsch "Öffentliche Registrierung".
(siehe image1)

Problem:
Ich muss die "Öffentliche Registrierungsseite" ändern. Ich muss zum HTML Code bzw zum Javascript gelangen, sodass ich ein Textfeld komplett löschen kann und das zweite Textfeld umbennen kann.
(siehe image2)

Auf dieser Seite steht zwar wie und wo es zu finden wäre (unter registration), aber leider finde ich diese Option bei mir nicht.:
help.limesurvey.org/portal/en/kb/article...ion-mandatory-fields
Wo konkret wäre das zu finden?

Ich benutzte eine Version, wo ich selbst beim Theme keine Änderungen machen kann, weil meine Stelle dies gesperrt hat.
(image3, image4, image5 zeigen meine "Menübänder")
Ich hoffe es findet sich trotzdem eine Lösung.

Vielen Lieben Dank
  • Joffm
  • Joffm's Avatar
16 Oct 2024 22:37 - 16 Oct 2024 22:43
Replied by Joffm on topic Redirect link with panelist
Hi,
1. there is no question to store the RID.
Create a hidden short text question in the first group RID

2. Your links seem to be broken. Did you copy them?
See
 

Now when I change the links to
Code:
https://samplicio.us/s/ClientCallBack.aspx?RIS=20&amp;RID={RID}&amp;rst=3
(The end-url analogue.)
And the editor changed the simple ampersand to the HTML entity. Horrible.

Now I get this

a. screen out
Survey started with RID=Fitzliputzli
 
and
 
You see the parameter is stored. Of course this question has to be hidden.

There is the screen out link
 

b. full survey
Survey started with RID=Hotzenplotz
And we get the end-url as.
 

So everything is fine.

Joffm

@holch already had some remarks concerning the survey.
I did not look at the logic.
  • hannia.nawaz
  • hannia.nawaz's Avatar
16 Oct 2024 17:18
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.6.5
Own server or LimeSurvey hosting: Lime Survey hosting
Survey theme/template: fruity
==================
Hi, 
I am trying to add a prefer not to answer option with my multiple choice with text options as attached. I added an open next question after to add the prefer not to answer option. I removed the select all that apply option for the 'prefer not to answer' by using the following code in the source of the question: 

<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
      $('#vmsg_{QID}_default').html('<span class');
    });
  </script>

But now I want to remove the spacing between the text answers and the prefer not to answer option to make it look like they're all part of a single question and I am not able to do that. Is there a way to remove the spacing just for this question?
Displaying 121 - 135 out of 4957 results.

Lime-years ahead

Online-surveys for every purse and purpose