Welcome to the LimeSurvey Community Forum

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

Using a text question with regex validation for a collection of a huge quantity

  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #221091 by external_eval
Hi all,
I'm preparing a panel study and I'm collecting email addresses from certain institutions. The last time I did something like that, I used multiple short text questions with regexMatch in the question validation equation for each subquestion to check whether the input is truly an email address. Each text box was meant for one address. The point is, there are many such institutions and each sends many emails. So a survey is a good collecting tool to ensure the addresses are all in the correct format. And it's both easy for the respondents to fill in the addresses and for me to process them afterward.
But now the number of the institutions is too high (1000+) and the number of email addresses is even higher (each institution up to 200). The previous solution is not suitable now (imagine manually filling in 200 addresses each to its own short text space). I was thinking of having a Huge free text question where the institutions could simply paste a batch of email addresses. A simple copy and paste from a spreadsheet, one column and one address in a row. But I couldn't come up with a suitable regular expression combination since the number of the addresses could be anything between 1 and 200. What regular expression would you use for the validation?
Or maybe there are other solutions to reach the same goal that didn't come to my mind?
LimeSurvey 3.15.1+181017
Thanks a lot!
Jacob
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #221105 by tpartner
I'm not sure how you process the email addresses but a possible alternative might be using a file-upload type question where the respondent could directly upload a CSV or Excel file.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #221118 by external_eval
Hi Tony, thanks for a great suggestion. It came to my mind as well because I have experience with the same approach to a lesser extent. The CSV files or Excel files can be combined through a macro. The problem is that in my experience they often paste the content in the wrong format no matter how specific instructions and FAQ you provide. There were many errors and although some of them could be predicted and corrected ex-post, many were very "inventive" and required manual corrections. That's why I started to use regex to check whether it's a correct e-mail address.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 6 months ago #221133 by DenisChenu

A simple copy and paste from a spreadsheet, one column and one address in a row.
 
It's the usage of : gitlab.com/SondagesPro/QuestionSettingsT...ionSpreadsheetSurvey
Sample : demo.sondages.pro/896317

You can set your control on valid email in a short text question with question validation.

 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #221211 by external_eval
Hi Denis,
Thank you very much, that's an ingenious solution. However, the plugin is tested on versions 3.22 and 3.25, right? While I have 3.15.1+181017 (and for other purposes, I have one with version 5.1.17+211025). On the 3.15 I didn't see any change after activating the plugin, version 5.1 didn't accept the plugin at all. How do I recognize the plugin works properly? Should I see the spreadsheet function in the question type menu?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 6 months ago #221240 by DenisChenu
No,
It's new settings for long texte question type
I must update usage here
gitlab.com/SondagesPro/QuestionSettingsT...oken-enables-surveys

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #221251 by external_eval
Amazing. This is going to save the respondents plenty of time. The responses are filled in the first survey but they get saved in the second survey. It means that if I have several of such questions in the first survey, I need a corresponding number of second surveys, right? Or is it possible to have all these questions from the first survey embedded in a single second survey?
I created the identical table of survey participants, including their attributes, for the first and all second surveys and it seems all the attributes are saved together with the responses in the second survey(s). Sir, you made my day. Merci beaucoup!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 6 months ago #221257 by DenisChenu
Each question need a specific survey.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: external_eval
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose