Welcome to the LimeSurvey Community Forum

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

Showing Text Question and Drop down list at the same line

  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 1 week ago - 4 years 1 week ago #195376 by kevinleung
Hi All,

I have some layout questions.
Can I show Text Question and Drop down list at the same line?
Example:



One more question is:
Can i insert this question inside another question?
Example:

I want to ask their name (Title+Name) if they want to add/update.

Thank you very much!

Kevin
Last edit: 4 years 1 week ago by kevinleung.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago #195388 by Joffm
Hi,
your first question you answered by yourself, didn't you.
Array(text) with the drop-down javascript snippet.

Second question:
Split the questions.
1. Single punch with displaying the existing values ("no change", "update", "add")
2. Text question(s) to set the new values.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 1 week ago #195389 by kevinleung
Hi Joffm,

Ahaha, I used Paint to draw the image of first question. I don't know how it works...
For the second question, I would like to insert first question into second question. (in the red box)
Thanks!

Kevin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago #195392 by Joffm
1.
www.limesurvey.org/forum/can-i-do-this-w...west-template#188725

2.

I would like to insert first question into second question

Several times "I would like to do"; but if it is not possible I have to think of something else.
To be honest: I do not exactly know why there is this single punch question.
Refering to your other post you may populate the fields of the array with the values of a contact person (if existing)
And your respondent may leave as it is, or change, or insert a contact (if the field is empty)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 1 week ago #195484 by kevinleung
Hi Joffm,

Thank you for the reply.
I feel sorry that i have too many questions...because i am not very good at writing javascript, so i dont know if it is feasible....

Kevin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago - 4 years 1 week ago #195490 by Joffm
Hi, in my opinion the javascript of the linked post is really easy to understand.
You see the columns "X001" and "X004", you see the options, which you may compare with the screenshot.

And as long as we do not see what you tried - and maybe failed - we cannot help.

And generally said: Everything you want to achieve you can do by built-in features:

Here the contact persons title and name are stored in two TOKEN_ATTRIBUTEs

1. case (values inserted as default answers)


2. case (attribute empty)


You see the different question text (inserted by EM)

Joffm

P.S. There are some examples here how to change the first text input to a drop-down.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 1 week ago by Joffm.
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 1 week ago #195495 by kevinleung
Hi Joffm,

Thanks for the opinion.
As I said before, this is a "layout question"..........
We can capture the data for sure, but I am wondering to know if there are any better layout..........

In your example, it is not in the same line and the title is not dropdown.

And I looked in some example already...but I did not upload here...
I used array question type to make a similar layout:

But it is inside a box and not good looking.

Kevin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago - 4 years 1 week ago #195496 by Joffm

I used array question type to make a similar layout:

Yes, this is the way to do it if you want to have two entry fields in one row.
And that's what the linked post is about.

So you were able to adapt the javascript.

But it is inside a box and not good looking.

Well, that's a case of css and your theme.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 1 week ago by Joffm.
The topic has been locked.
  • kevinleung
  • kevinleung's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 1 week ago #195499 by kevinleung
I think it is more complicated if i use array and change the css.
So I am thinking about combining the question (Combine drop down and text question

Kevin
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 week ago #195502 by Joffm
Well, depends on your knowledge of css.



Something like that:
Code:
<style type="text/css">
.table-bordered,
.table-bordered>thead>tr>td, .table-bordered>thead>tr>th, 
.table-bordered>tbody>tr>td,  .table-bordered>tbody>tr>th, 
.table-bordered>tfoot>tr>td, .table-bordered>tfoot>tr>th, 
{
    border: 0 !important;
}
 
 .table-bordered>thead
  {
    display:none;
  }
</style>

And: an array(text) doesn't have default answers. So you have to pipe the existing values of the contact person by EM.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 10 months ago #198251 by AnnaBurmeister
Hello!

I feel my Question is related to this one and I want to clarify, if I understood your answer correctly. Is it really not possible to Programm something like this?

A model of what I want to Programm is the following:

Question 1

Answer 1a
If answer 1a, Question 2,
answer 2a
If answer 2b, Question 3
answer 2b
If answer 2c, Question 4
Answer 1b
If Answer 1b, Question 5,
answer 5a
If answer 5a, Question 6
answer 5b
Answer 1c

Basically, new Questions shall be immediately following to the answers they are connected to and they shall be visible from the beginning.

I would very much appreciate your help.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198275 by tpartner
I don't know how that is related to "Showing Text Question and Drop down list at the same line". We have no idea of what question types you want or your LimeSurvey version.

Pleaseopen a new topic and provide a better mock-up, the LS version and a small sample survey (.lss file) containing only those questions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose