Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Validate Subquestions?

Re: Validate Subquestions? 2 years 3 months ago #84342

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
For 1.92, you can do this:
{if(validation_expression,'',if(LANG=='en','Please enter a valid ....','Bitte antworten ...'))}

For 2.0, I'd recommend making this field one of those that can be translated into multiple languages via the quick translation feature.
Last Edit: 2 years 3 months ago by TMSWhite.
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 3 months ago #84367

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
Hello,

Can use pseudo class lang too in template.css:
<span lang="en">'Please enter </span><span lang="de">Bitte antworten</span>

And in template.css
:lang(en) :lang(de){display:none}
:lang(de) :lang(en){display:none}

Denis
Last Edit: 2 years 3 months ago by DenisChenu. Reason: typo and code
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 2 months ago #85375

  • Bitbull
  • Bitbull's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Sorry to dig up this (old) thread, but I've got a serious problem with validation of subquestions. I've attached my survey here (sorry, it's in Dutch, but easy to understand as I've stripped it down to the problematic question).
I really don't see why I can't get past the question (when testing the whole survey, that seems to be impossible, a message keeps popping up). Regular expressions have been validated, everything seems fine with "realtime validation", but impossible to get past the question.
Could you guys please take a look and tell me what I'm doing wrong?
Thanks in advance!
Attachments:
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 2 months ago #85442

  • Bitbull
  • Bitbull's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Okay, I already found the solution.
Apparently, regular expressions in LimeSurvey need to start & end with / character.
It was possible to notice in the example, but I found it nowhere clearly stated, only here (point 2)
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 2 months ago #85482

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5423
  • Thank you received: 307
  • Karma: 252
If you are missing this information at our manual, please add it there. It's a wiki, everyone can edit it.

You can also post a feature request at our idea tracker to add some JavaScript validation before saving a regular expression. Such a script can check for the first characters and throw an error.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 2 months ago #85496

  • Bitbull
  • Bitbull's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Okay, I added the note to the wiki page.
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 2 months ago #85510

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5423
  • Thank you received: 307
  • Karma: 252
Thanks for your help.

Feeld free to improve the manua whenever something is missing or not clear.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Validate Subquestions? 2 years 1 month ago #86185

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5423
  • Thank you received: 307
  • Karma: 252
debianese wrote:
Thanks! But I have another question: How can you localize the error message?
I have to create a survey in german and english. The error message should be in the selected language!
To my kniowledge Limesurvey 2 supports multilingual question attributes at the advanced question settings.

There is also an interesting blog post at www.limesurvey-consulting.com which describes different methods of validating email addresses:
"How to validate email addresses at Limesurvey"

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.178 seconds
Donation Image