Welcome to the LimeSurvey Community Forum

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

Format answers with iframes as a table?

  • bubbagump210
  • bubbagump210's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago - 3 months 1 week ago #254763 by bubbagump210
Format answers with iframes as a table? was created by bubbagump210
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.4.1 CE
Own server or LimeSurvey hosting: Self hosted
Survey theme/template: Vanilla
==================
I am trying to setup a voting system for my son's school. They are posting videos and voters are allowed to vote for one best winner. I think I have everything figured out except the answer formatting. Currently I have a answers like:
Code:
<span style="display: none;">Option 1</span><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" frameborder="0" height="315" sandbox="allow-scripts allow-same-origin" src="https://www.youtube.com/embed/dQw4w9WgXcQ?si=a6VETbKPaM6S-B3K" title="YouTube video player" width="560"></iframe><center>Rick is number 1 best!</center>

This creates a long list of options with a radio button at the upper left of the iframe.

Ideally I would like to create a table of answers ( 2 wide or 3 wide and however many long), put the radio button next to the Text in the <Center> tag, and get rid of the red asterisk.

Can I do this?

Screen shot of current attached.

FWIW, I tried to remove the red asterisk using .asterisk {display: none;} ala the FAQ. I chose Vanilla, extend, clicked the custom.css, added that line, and "copy to this theme and save". When I previewed the survey I got a blank white page - so I did something wrong. When I viewed source and clicked into the custom.css in the preview the code show was as follows:
Code:
/******************
User custom CSS
---------------
 
In this file you can add your own custom CSS
It will be loaded last, so you can override any other property.
Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/
 
.table-bordered > thead > tr > th {
border: 1px solid #dadada;
}
.table-bordered > thead > tr > td {
border: 1px solid #dadada;
}
.asterisk {display: none;}

So it sure seems the CSS is loading that new line but not behaving as expected.
 
Last edit: 3 months 1 week ago by bubbagump210.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago #254772 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
To show more than one video in a row is easy. Set the "columns" accordingly.
 

Here two images to show that it is possible to center the buttons.
This is a HTML table in the question text and the buttons are moved there by javascript.

 



Now pülease send a lss export of these relevant questions and we will see.

Joffm

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

Please Log in to join the conversation.

  • bubbagump210
  • bubbagump210's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #254774 by bubbagump210
Replied by bubbagump210 on topic Format answers with iframes as a table?
Aha, I see the columns setting. That was easy enough. Thank you!

So it's down to the red asterisk and your JavaScript mention. The LSS is attached.

I know how to create a table easily enough in the question. So I am curious to know how to link the question to the answer.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago - 3 months 1 week ago #254775 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
Quick test

 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 months 1 week ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago #254776 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
And I do not see any issue setting

in the "custoom.css" of the extended theme.

And why do you make us first unzip your file?
Attach the lss. It's small enough.

Joffm
 

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

Please Log in to join the conversation.

  • bubbagump210
  • bubbagump210's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #254777 by bubbagump210
Replied by bubbagump210 on topic Format answers with iframes as a table?
Sorry, I simply posted it exactly as it came out of LimeSurvey. I didn't know the convention.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago #254778 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
But then it seemed to be a lsa export.
You see there are several different export options

lsq (q=question)  exports a single question
lsg (g=group) exports a single group
lss (s=survey (or structure)) exports the structure of the entire survey including survey wide settings
lsa (a=archive) exports the structure of the survey AND the responses.

We always ask for lss, because lsq and lsg are language sensitive, while lss contains everything needed to ease the work of us volunteers.

Joffm

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

Please Log in to join the conversation.

  • bubbagump210
  • bubbagump210's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #254779 by bubbagump210
Replied by bubbagump210 on topic Format answers with iframes as a table?
Try this... it doesn't seem to give me any option as to if I can use a ZIP or not.

I am totally bewildered on the CSS issue. I also enabled debug as I saw elsewhere that the cache theme can be an issue and it didn't change anything. It's a minor issue which I can continue to chase after. The JavaScript is beyond me though. Thank you for your help so far!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago - 3 months 1 week ago #254796 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
Hi, here is the question with 5 videos.
Your three and - just to show - two more Ricks.
 

Up to you to adapt to your number of videos (or display only two in a row)

 

File Attachment:

File Name: limesurvey...6577.lss
File Size:33 KB


Joffm

By the way:
You used an image-select question.
This is to display images. And here you enter only the path to the image without any HTML.
And you click the image to select
 

Otherwise it is displayed as a normal list(radio), as you see in your example.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 months 1 week ago by Joffm.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago #254799 by DenisChenu
Replied by DenisChenu on topic Format answers with iframes as a table?

You used an image-select question.
 
I don't recommend using this theme for reasons of accessibility and web quality.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 1 week ago #254800 by Joffm
Replied by Joffm on topic Format answers with iframes as a table?
Nor do I.
I only mentioned it because the TO used it by mistake.

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • bubbagump210
  • bubbagump210's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 1 week ago #254816 by bubbagump210
Replied by bubbagump210 on topic Format answers with iframes as a table?
This is fantastic, thank you! I would have never have gotten all of that JS and CSS figured out.

As for image radio vs list radio - don't give credit for a mistake when it was ignorance.

Thank you again!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose