Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: validation)

  • Joffm
  • Joffm's Avatar
08 Nov 2023 21:05
Replied by Joffm on topic Info-Icon anzeigen
Naja,
wenn Du Dir die config.xml genau ansiehst, bemerkst Du, dass dieser gesamte Block umrandet ist mit "default data"
Alle diese Einstellungen sind für die Anzeige der Vorschau im Theme-Editor zuständig, für nichts anderes.
Ich habe einmal etwas hart gecodet.
 

Dahingegen siehst Du, dass das Zeichen in einer Umfrage (wenn Du das Webdevelopment tool Deines Browsers benutzt) hier definiert ist.
 

Zeile 204 der "theme.css".
 
Stimmt.
Und wenn man dies ändern will, so überschreibt / ergänzt man diese Definition in der "custom.css".
Das ist kein "workaround", sondern so ist LimeSurvey gedacht.
Daher steht am Anfang der "theme.css" ja ganz groß "DO NOT TOUCH"

Die Lösung von oben funktioniert nicht, da damit auch der Hilfetext gestylt wird. Validation-Message und Hilfstext sehen somit gleich aus (was ich nicht möchte)


Das Dumme ist, dass dies in 6.x. in plain vanilla eben so ist.
 

Wenn Du das nicht willst, dann erweitere das theme und füge Deine Änderungen in der "custom.css" ein.
Hier einmal mit einem Händchen und rotem Text.
Der Hilfetext bleibt unberührt.
 

mit 
Code:
.question-valid-container .ls-questionhelp:before {
   content:"\f0a4";
}
.question-valid-container .ls-question-message {
    color:red !important;
}

Joffm
 
  • frosch
  • frosch's Avatar
08 Nov 2023 20:21 - 08 Nov 2023 20:25
Replied by frosch on topic Info-Icon anzeigen
Meine Frage ist, wie ich LS dazu bekomme, den Wert aus der config.xml auch zu nutzen. Dort gbts schon einen HTML-Schnipsel mit genau dem Info-Icon von Font Awesome.

Die Lösung von oben funktioniert nicht, da damit auch der Hilfetext gestylt wird. Validation-Message und Hilfstext sehen somit gleich aus (was ich nicht möchte)

Das info-Icon soll für die Validation Message genutzt werden.

Leider gehts nur mit nicht so schönen CSS-Selectoren:
Code:
[id^=vmsg_].ls-questionhelp:before{}

Ist für mich eher ein Workaround als eine saubere Lösung.
  • tpartner
  • tpartner's Avatar
31 Oct 2023 13:08
Sure, if you want to modify the display rules for irrelevant items.
  • DenisChenu
  • DenisChenu's Avatar
31 Oct 2023 09:18 - 31 Oct 2023 09:18
No need javascript,
Included in expression + attribute : demo.sondages.pro/561662?newtest=Y&lang=en
 

 
  • DenisChenu
  • DenisChenu's Avatar
31 Oct 2023 08:59
Replied by DenisChenu on topic Duplicate survey with attachment

We need to add some fields and do a validation of data and file entered.

Like:
attachement (inserted by the user)
valid: yes - no

I tried with create new survey - duplicate, but I get only the structure. I lose both tokens and responses.
 
Seems to be the real life usage of gitlab.com/SondagesPro/SurveyAccess/surveyChaining

The system copy Files upload and answersAsReadonly shown link to download and validate files.

The validator email are inside token, the validator can send again to the original participant the response to be updated.
  • tpartner
  • tpartner's Avatar
30 Oct 2023 15:09

There might be more  solutions by javascript, which disable a subquestion if the other one was selected.
This small script, placed in the source of a multiple-choice question, will render various answer items as exclusive by disabling other exclusive items.

Modify the values in the exclusiveCodes array as necessary.

Code:
<script type="text/javascript" data-author="Tony Partner">
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // Define the exclusive sub-question codes
    var exclusiveCodes = [
      'SQ001',
      'SQ002'
    ];
 
    // Identify this question
    var qID = '{QID}';
    var thisQuestion = $('#question'+qID);
 
    // Add some classes
    $.each(exclusiveCodes, function(i, code) {
      $(':checkbox[id$="X'+qID+code+'"]', thisQuestion).addClass('exclusive-input');
    });
 
    // Listener on the exclusive items
    $(':checkbox.exclusive-input', thisQuestion).on('change', function(e) {
       handleExclusive(thisQuestion);
    });
 
    // Returning to the page
     handleExclusive(thisQuestion);
  });
 
  // A function to handle the exclusive items
  function handleExclusive(thisQuestion) {
    $(':checkbox.exclusive-input', thisQuestion).prop('disabled', false);
 
    if($(':checkbox.exclusive-input:checked', thisQuestion).length > 0) {
      $(':checkbox.exclusive-input:not(:checked)', thisQuestion).prop('disabled', true);
    }
  }
</script>



Sample survey attached:  

File Attachment:

File Name: limesurvey...9853.lss
File Size:34 KB
  • darpao
  • darpao's Avatar
30 Oct 2023 14:36 - 30 Oct 2023 14:36
Duplicate survey with attachment was created by darpao
Hi,
is it possible to clone a whole survey with the same tokens and responses, including the attachments?
We need to add some fields and do a validation of data and file entered.

Like:
attachement (inserted by the user)
valid: yes - no

I tried with create new survey - duplicate, but I get only the structure. I lose both tokens and responses.
Now I know that I can import tokens and responses, but about attachments?

Thank you
  • margot1234
  • margot1234's Avatar
26 Oct 2023 21:52
Ok, I'm going to check. Thank you for your help!
  • holch
  • holch's Avatar
26 Oct 2023 20:32
This seems to be a custom 403 error message from your server.

HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden.


You need to check with your server admin.
  • Joffm
  • Joffm's Avatar
26 Oct 2023 18:33
What image is this?
If you get an error message, please send the lss export

Joffm 
  • margot1234
  • margot1234's Avatar
26 Oct 2023 18:15
Thanks. That's what I tried but I got an error message... (error 403)
  • Joffm
  • Joffm's Avatar
26 Oct 2023 18:05
Hi, the easy solution is to validate

Here two validations:
a. !(Q1_SQ001.NAOK=="Y" and Q1_SQ002.NAOK=="Y")   not both selected
b. count(Q1_SQ001.NAOK,Q1_SQ002.NAOK)<2  the number of selected items is less than 2, so only one of them or none

There might be more  solutions by javascript, which disable a subquestion if the other one was selected.

Joffm
  • margot1234
  • margot1234's Avatar
26 Oct 2023 17:59
Hello. Sorry I don't know that. So,

I have a multiple choice question. I would like to block respondents from checking a particular answer if they have checked another that is contradictory.

Ex:

- a
- b
- c
- d

I want to stop the respondent from ticking b if he has already ticked a and inversely I want to stop him ticking a if he has ticked b. How can I do this?

I suppose I need to enter an equation in the question validation, but I can't manage it...

Thanks for your help!
  • Joffm
  • Joffm's Avatar
26 Oct 2023 17:49
Please, English in this part of the forum.

Or use the French part.

Joffm
  • margot1234
  • margot1234's Avatar
26 Oct 2023 17:27
Bonjour. 

J'ai une question à choix multiples de type. J'aimerai empêcher les répondants de cocher une réponse en particulier s'ils ont coché une autre qui est contradictoire. 

Ex: 

- a
- b 
- c
- d

Je veux empêcher le répondant de cocher b s'il a déjà coché a et inversement je veux l'empêcher de cocher a s'il a coché b. Comment est-ce que je peux faire cela ? 

Je suppose que je dois indiqué une équation dans la validation de la question mais je n'y parviens pas...

Merci! 
Displaying 76 - 90 out of 180 results.

Lime-years ahead

Online-surveys for every purse and purpose