Welcome to the LimeSurvey Community Forum

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

creating a table using javascript and the options are based previous answer

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 6 months ago #232596 by qiangqi
Thanks for your help again!!! Could you share your .lss file to me? the picture of yours looks better than mine. I want to know how to fill the background color for the whole questionnaire, set the width and color for table's lines, and adjust the size of button.

Best wishes,
Qiang

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #232684 by Joffm
Hi,
because this was only a rough prototype the code is a bit messy.

I will improve it and send.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #232686 by Joffm
Here it is.
 

File Attachment:

File Name: limesurvey...6499.lss
File Size:40 KB

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 6 months ago #232693 by qiangqi
Hi Joffm,

Thanks for your time and effort to help me. I don't know when I could solve these problems if I don't get your help. I sincerely hope you and your family could are happiness and healthy. Thanks for your help again!!!

Best wishes,
Qiang

Please Log in to join the conversation.

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 6 months ago #232803 by qiangqi
Hi Joffm,

for the file you send to me, I find a problem that the width of each column could not be defined. so, the result is that first part and second part could be corresponded, as shown the picture. for solving the problem, I try to define the width for different columns in command, as shown the picture, but in fact, it doesn't work. so, I want to know if you have some method to deal with the problem. Thanks.

Best,
Qiang
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #232804 by Joffm
1. Of course I resized the images to the same width
As only the first column is set to a fixed width, the rest will distribute evenly.
I do not see any images in your screenshot.

2. You added more columns than you showed before.

So as this is not really LimeSurvey related, only HTML and css, the final layout is up to you.
Now you know how it works.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 5 months ago - 1 year 5 months ago #233943 by qiangqi
Hi Joffm,

for the question of group by group, I afraid that someone may change the first choice, other transports in my design, after seeing the information of parcel in second table. so, I want to know if we could lock other transports as soon as the respondents choose a transport. I check the forum and I find some similar questions, but those focus on a specific column, like last one. The other method could solve the question, i think, is using a 'next button' after choosing a transport and in the next page with both tables, the first table only shows the button which is chosen in the last page, shown as the picture in attachment. but I don't know how to do it using JS. So, I hope I could get your help.

Best,
Qiang

 
Last edit: 1 year 5 months ago by qiangqi.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233945 by tpartner
If you "lock" it, how do you expect respondents to fix erroneous clicks?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233946 by Joffm
1. As @tpartner, why shouldn't it be allowed to change the transport mode?

2. In that case you have to double the question.
a  only the first part. After selection 
b. display the first part again with a fixed mark of the selection AND the second part.

Just an idea

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 5 months ago #233949 by qiangqi
yes, the erroneous click is definitely a problem. and like you shown 2(a,b), the double question is a problem. but I am afraid people will change the transportation mode after they see the second part. the result without second part is important for my research. So, if I use the first method, how about telling respondent to tick carefully? I hope I could get your advice for the problem.

Qiang

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233950 by Joffm
And, sorry, I answered from my smartphone.
But now I saw that I remembered well.
There is an option "Reselect your transport mode". So it is allowed.

But a simple thing would be:
Separate images and radio buttons into two different rows.
Hide the row with the radio buttons "onClick".
Add a class to this row, and hide it in the "onClick" event of these "radio-items"

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • qiangqi
  • qiangqi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 5 months ago #233957 by qiangqi
Hi Joffm,

I separate the image and radio button into different rows. then, I want to obey your advice to lock other modes once one mode is chosen by searching 'onClick' in the forum, but I don't get the same quesition with mine. So, would you tell me how to use the 'onClick' button to reach my object. and you could get my .lss file in the attachment. my version is 3.28.36

Best,
Qiang

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose