- Posts: 12
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
- ChristianJeske
- Topic Author
- Offline
- New Member
Less
More
3 years 9 months ago #203137
by ChristianJeske
LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender was created by ChristianJeske
Hello,
I use LimeSurvey Version 4.3.3+200707. With LimeSurvey Bootstrap Vanilla Survey Theme.
I found forums.limesurvey.org/forum/german-forum...eitere-einf%C3%BCgen this really cool way to add icons to buttons to create this gender selection question.
Now I did copy the provided code into the answer option with the editor.
So in the answeroption text it says <i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich
But if I launch the question it shows exactly this text in the button and not the icon.
Question would be, do I need to add something to custom.css to allow fontawesome? Or in the css box in the question?
And yes, I tried google to search and the forum search but did not find anything better then this link from above which I can't make work.
thanks for any pointers and tips
I use LimeSurvey Version 4.3.3+200707. With LimeSurvey Bootstrap Vanilla Survey Theme.
I found forums.limesurvey.org/forum/german-forum...eitere-einf%C3%BCgen this really cool way to add icons to buttons to create this gender selection question.
Now I did copy the provided code into the answer option with the editor.
So in the answeroption text it says <i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich
But if I launch the question it shows exactly this text in the button and not the icon.
Question would be, do I need to add something to custom.css to allow fontawesome? Or in the css box in the question?
And yes, I tried google to search and the forum search but did not find anything better then this link from above which I can't make work.
thanks for any pointers and tips
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
3 years 9 months ago #203154
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 LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
It works as expected for me in version 4.3.4.
Can you attach a small sample survey (.lss file) containing only that question?
Can you attach a small sample survey (.lss file) containing only that question?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, ChristianJeske
The topic has been locked.
- ChristianJeske
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
3 years 9 months ago #203163
by ChristianJeske
Replied by ChristianJeske on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
Sure, it is one 2 questions, the first is the auto-question for a new survey. I'm very sure I'm doing something very simple wrong, but I only work with the software for a few weeks and still learn the basics.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12916
- Thank you received: 3975
3 years 8 months ago - 3 years 8 months ago #203182
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
Hi,
did you really attach your try?
In "männlich" you entered
<p><span style="color:blue;"><i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich</span></p>
If you clean that to
<span style="color:blue;"><i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich</span>
you get
But I have no idea, what this code is intended to do
<p><span style<span style="color:#00AA00;">=</span><span style="color:#ff0000;">"background-color:blue;color:white;font-size:14pt;border: 1px solid green;padding:5px 42px"</span><span style="color:#00AA00;">></span>stimme zu</span<span style="color:#00AA00;">></span></p>
something like:
<span style="background-color:blue;color:white;font-size:14pt;border: 1px solid green;padding:5px 42px">stimme zu</span>
If you want to have buttons you have to use the question theme "bootstrap buttons"
Here shown with "fruity" without variation", and some different colors.
Joffm
did you really attach your try?
In "männlich" you entered
<p><span style="color:blue;"><i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich</span></p>
If you clean that to
<span style="color:blue;"><i class="fa fa-mars fa-fw fa-2x" aria-hidden="true"></i>männlich</span>
you get
But I have no idea, what this code is intended to do
<p><span style<span style="color:#00AA00;">=</span><span style="color:#ff0000;">"background-color:blue;color:white;font-size:14pt;border: 1px solid green;padding:5px 42px"</span><span style="color:#00AA00;">></span>stimme zu</span<span style="color:#00AA00;">></span></p>
something like:
<span style="background-color:blue;color:white;font-size:14pt;border: 1px solid green;padding:5px 42px">stimme zu</span>
If you want to have buttons you have to use the question theme "bootstrap buttons"
Here shown with "fruity" without variation", and some different colors.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 8 months ago by Joffm.
The following user(s) said Thank You: ChristianJeske
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
3 years 8 months ago #203183
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 LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
3 years 8 months ago #203225
by DenisChenu
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.
Replied by DenisChenu on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
XSS must allow this,
Can be reported, but be sure it's not HTML editor
Can be reported, but be sure it's not HTML editor
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.
The topic has been locked.
- ChristianJeske
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
3 years 8 months ago #203550
by ChristianJeske
Replied by ChristianJeske on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
Thank you @Joffm
I did try to use first copy / paste to the field, then after it failed the editor and I think the editor added all those useless code.
I did it again now, just copy and paste of your code and it works!
Thanks so much!
BTW isn't it strange that there is no default option to show more then 2?
I did try to use first copy / paste to the field, then after it failed the editor and I think the editor added all those useless code.
I did it again now, just copy and paste of your code and it works!
Thanks so much!
BTW isn't it strange that there is no default option to show more then 2?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12916
- Thank you received: 3975
3 years 8 months ago #203552
by Joffm
Are you talking of the "Gender"- question?
There are a few explanations.
All these questions ("Y/N", "M/F", "5-point-array",...) were implemented a long, long time ago. Nowadays they are more or less obsolete; I never use them.
My opinion is: Only for the lazy ones. And how often do we have a question like "I use the 5-point-array. But I would like to have 6 options".
Nowadays we have better question types or question themes to be more flexible.
And: it isn't strange at all. To offer something you seem to expect (a special question type "gender" that reflects the legal regulations in all countries of the world) is obviously both complex and unnecessary (question type "single response")
And you have realized already:
Only copy and paste from "plain text". Copying e.g. from Word, etc., or here the forum will include all inline css and HTML codes that format the output.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
BTW isn't it strange that there is no default option to show more then 2?
Are you talking of the "Gender"- question?
There are a few explanations.
All these questions ("Y/N", "M/F", "5-point-array",...) were implemented a long, long time ago. Nowadays they are more or less obsolete; I never use them.
My opinion is: Only for the lazy ones. And how often do we have a question like "I use the 5-point-array. But I would like to have 6 options".
Nowadays we have better question types or question themes to be more flexible.
And: it isn't strange at all. To offer something you seem to expect (a special question type "gender" that reflects the legal regulations in all countries of the world) is obviously both complex and unnecessary (question type "single response")
And you have realized already:
Only copy and paste from "plain text". Copying e.g. from Word, etc., or here the forum will include all inline css and HTML codes that format the output.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ChristianJeske
The topic has been locked.
- ChristianJeske
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
3 years 8 months ago #203554
by ChristianJeske
Replied by ChristianJeske on topic LimeSurvey 4 -> adding fontawesome icons to radio buttons for more then 2 gender
Right, what I would want would be different all over the world. And changes from time to time. Did not really think about that.
So DIY it is. Truth be told I was just surprised it was not a standard thing as it seems for me I see it everywhere.
Now that I know how it is kinda easy. And fun to be able to add so many icons to boxes.
Thanks again
So DIY it is. Truth be told I was just surprised it was not a standard thing as it seems for me I see it everywhere.
Now that I know how it is kinda easy. And fun to be able to add so many icons to boxes.
Thanks again
The topic has been locked.