- Posts: 26
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Question Type : Time
- amritdeep
- Topic Author
- Offline
- Junior Member
Less
More
11 years 8 months ago #82924
by amritdeep
Question Type : Time was created by amritdeep
To add a new question, is it possible to add question type (Time) (24 hours clock) just like question type (Date)
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
11 years 8 months ago #82996
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question Type : Time
There is no such question available.
A solution may be to use a select-dropdown question.
A solution may be to use a select-dropdown question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- amritdeep
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
11 years 8 months ago #83004
by amritdeep
Replied by amritdeep on topic Question Type : Time
Under one question can i use three drop down selection box.
For e.g.
Que. What is your birth time?
Hours : (Here drop down with values 0-12)
Minutes : (Here drop down from 0-30)
Schedule: (Drop down for am-pm)
For e.g.
Que. What is your birth time?
Hours : (Here drop down with values 0-12)
Minutes : (Here drop down from 0-30)
Schedule: (Drop down for am-pm)
The topic has been locked.
- floccs
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
11 years 8 months ago - 11 years 8 months ago #83006
by floccs
Replied by floccs on topic Question Type : Time
I have made this simple workaround using jquery-ui-timepicker-addon.js.
Simply put the following code in the question field of a brief-text question (remember that you have to enable javascript in your survey)
Simply put the following code in the question field of a brief-text question (remember that you have to enable javascript in your survey)
Code:
Time question <style> .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } .ui-timepicker-div dl { text-align: left; } .ui-widget-header { display:none; } .ui-datepicker-current { display:none; } .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; } .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; } .ui-timepicker-div td { font-size: 90%; } .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } </style> <script src="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js"></script> <script> $(document).ready(function(){ $('#answer{SGQ}').timepicker({ timeText: 'Time', hourText: 'hour', minuteText: 'minute', closeText: 'Done' }); $('#answer{SGQ}').attr('readonly', 'readonly'); }); </script>
Last edit: 11 years 8 months ago by floccs.
The topic has been locked.
- amritdeep
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
11 years 8 months ago #83042
by amritdeep
Replied by amritdeep on topic Question Type : Time
Thanks for reply.
Will you please tell me where i have to copy this code?
Please tell me the complete path....
Will you please tell me where i have to copy this code?
Please tell me the complete path....
The topic has been locked.
- floccs
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
11 years 8 months ago - 11 years 8 months ago #83043
by floccs
Replied by floccs on topic Question Type : Time
follow
this
guide and paste my code into the brief question text.
Last edit: 11 years 8 months ago by floccs.
The topic has been locked.
- amritdeep
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
11 years 8 months ago - 11 years 8 months ago #83046
by amritdeep
Replied by amritdeep on topic Question Type : Time
Please find the attachment and tell me what i have to select from drop down of "Question type"
oxosolutions.com/sites/backup_files/limesurveyforum.png
oxosolutions.com/sites/backup_files/limesurveyforum.png
Last edit: 11 years 8 months ago by amritdeep.
The topic has been locked.
- floccs
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
11 years 8 months ago #83052
by floccs
Replied by floccs on topic Question Type : Time
Short text question
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
11 years 8 months ago #83058
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question Type : Time
NICE solution flocs!
I would suggest putting the styles in your template.css file though - it's not really valid to put styles in the <body> element.
Can you add it to the workarounds section?
I would suggest putting the styles in your template.css file though - it's not really valid to put styles in the <body> element.
Can you add it to the workarounds section?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- amritdeep
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
11 years 8 months ago #83144
by amritdeep
Replied by amritdeep on topic Question Type : Time
Thanks a lot. It really works...
The topic has been locked.
- floccs
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
11 years 8 months ago #83272
by floccs
Replied by floccs on topic Question Type : Time
Workaround added
here
(style moved to the head tag through jquery)
The following user(s) said Thank You: Ben_V
The topic has been locked.
- Xtale
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 years 3 weeks ago #93162
by Xtale
Replied by Xtale on topic Question Type : Time
Hello,
I can't get this to work. JavaScript console says: "Uncaught TypeError: Object #<Object> has no method 'prop'" ?
I can't get this to work. JavaScript console says: "Uncaught TypeError: Object #<Object> has no method 'prop'" ?
The topic has been locked.