Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: validation)

  • 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! 
  • DenisChenu
  • DenisChenu's Avatar
12 Oct 2023 09:08
Il va falloir utiliser le gestionnaire d'expression et la validation de questions

Je prend pour l'exemple une question qui aurait le code Q01, les sous questions SQ01 à SQ017 avec SQ01 à SQ15 obligatoire

A mettre en validation
Code:
{!is_empty(Q01_SQ01.NAOK) and
!is_empty(Q01_SQ02.NAOK) and
!is_empty(Q01_SQ03.NAOK) and
…
!is_empty(Q01_SQ14.NAOK) and
!is_empty(Q01_SQ15.NAOK)}

Et penser au texte explicatif sur le champs dédié à l'aide dynamique.
Displaying 76 - 90 out of 181 results.

Lime-years ahead

Online-surveys for every purse and purpose