Welcome to the LimeSurvey Community Forum

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

An array with both a timepicker and a radio button

  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #216045 by external_eval
Hi all, 
How could I create an array (or basically a single-choice question) with both a time picker as one option and a radio button as an alternative option? The purpose of it is to pick the exact time if the respondent knows the answer and to tick the radio button if the respondent doesn't know. I attached a picture of a question like that. 
LimeSurvey 3.26.1
Thanks a lot!
Jacob
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #216055 by Joffm
I can propose this


 




These are two questions, the date/timepicker and a multiple question with only one subquestion
Merged by a little bit of css.

Add this to your "custom.css"
Code:
.disable-irrelevant.ls-irrelevant.ls-hidden{display:block;}
.disable-irrelevant.ls-irrelevant .form-control{background-color: #eee;cursor: not-allowed;}

.no-question{border-top:0;}
.no-question .question-title-container{display:none;}
.no-question .question-valid-container{display:none;}
.no-question .answer-container {
    padding-top: 0em;
    padding-bottom: 0.5em;
}
 
.no-bottom{border-bottom:0;margin-bottom:0;}
.no-bottom .answer-container { padding-bottom: 0em;}

Add
the css class "no-question" to the multiple question,
the css classes "disable-irrelevant no-bottom" to the time picker question
the relevance equation "is_empty(QMulti_SQ001.NAOK)" to the time picker question.

Joffm

By the way: It would be much easier, if you used a question of type short text to enter the time; here you may use the plugin "checkBoxForText" to add the "no answer" option
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • external_eval
  • external_eval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #216063 by external_eval
Replied by external_eval on topic An array with both a timepicker and a radio button
Dear Joffm,
it works perfectly (and the second solution is elegant as well), you're truly priceless!
Jacob
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose