- Posts: 13911
- Thank you received: 2548
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Delete select options (dropdown list) via java script
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
9 years 6 months ago #112376
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 Delete select options (dropdown list) via java script
Why put if ?
You put this in question 894 source, not elsewhere.
You put this in question 894 source, not elsewhere.
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.
- ongkichilam
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
9 years 6 months ago #112378
by ongkichilam
Replied by ongkichilam on topic Delete select options (dropdown list) via java script
Looks like I am missing something.... where exactly is the 'question source'?
I did that at templates/question.pstpl
I did that at templates/question.pstpl
The topic has been locked.
- ongkichilam
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
9 years 6 months ago #112379
by ongkichilam
Replied by ongkichilam on topic Delete select options (dropdown list) via java script
AH! I found it! Place it at the editor itself!
Thanks~! Works perfectly!
Thanks~! Works perfectly!
The topic has been locked.
- ongkichilam
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
9 years 6 months ago #112384
by ongkichilam
Replied by ongkichilam on topic Delete select options (dropdown list) via java script
No, {Q1.qid} became 'Undefined variable'.
Appreciate your swift response, Denis.
Appreciate your swift response, Denis.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13911
- Thank you received: 2548
9 years 6 months ago #112395
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 Delete select options (dropdown list) via java script
Q1 must be replaced by the first question code.
Updated exemple survey to show question code and the script.
Updated exemple survey to show question code and the script.
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.
- ongkichilam
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
9 years 6 months ago #112398
by ongkichilam
Replied by ongkichilam on topic Delete select options (dropdown list) via java script
Got it! Thanks again.
The topic has been locked.
- nickwelhar
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
9 years 1 week ago - 9 years 1 week ago #118226
by nickwelhar
Replied by nickwelhar on topic Delete select options (dropdown list) via java script
Check with........SPAM ? corelangs.com/js/progs/options.html Javascript Combobox
Nick
Nick
Last edit: 9 years 1 week ago by DenisChenu.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13911
- Thank you received: 2548
9 years 1 week ago #118228
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 Delete select options (dropdown list) via java script
@nickwelhar ? Did you really read the question or you search a forum to put a link ?
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.
- deejroamer
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
8 years 18 hours ago - 8 years 18 hours ago #133237
by deejroamer
Replied by deejroamer on topic Delete select options (dropdown list) via java script
@DenisChenu, Thank you for your amazing out of the box script. I just modded it a bit so that the CSS of the new select is same as it was for the original select.
Link Here
I am not sure how long link will be up so To do the same
Add this line
Mod this line
I request DenisChenu to permanently add this tweak to help any future users. Not everybody has time to skim through forums like us.
A credit to me would be nice
Link Here
I am not sure how long link will be up so To do the same
Add this line
Code:
var classSelectFilter = $("#question"+qID).find("select").attr('class');
Mod this line
Code:
var NewSelectElement = "<select id='"+idNewSelectFilter+"' class='"+classSelectFilter+"'><option value=''>"+$("#"+idSelectFilter+" option[value='']:first").text()+"</option></select>";
I request DenisChenu to permanently add this tweak to help any future users. Not everybody has time to skim through forums like us.
A credit to me would be nice
Last edit: 8 years 18 hours ago by deejroamer.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 15 hours ago #133248
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Delete select options (dropdown list) via java script
Our manual is a wiki, so you actually can add this yourself and help the community. The credit will then be given automatically through the system (I think at the end of the page).
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- deejroamer
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
8 years 8 hours ago - 8 years 8 hours ago #133256
by deejroamer
Replied by deejroamer on topic Delete select options (dropdown list) via java script
Oh, DenisChenu's Method is not updated in Manual.
I was just telling that the script DenisChenu has on his server (link he gave in the second post )
So that when somebody else uses his script he gets added benefits to CSS Retention.
I will try updating the wiki. Never done it before
@DenisChenu, Can I use your method to update the wiki?
I was just telling that the script DenisChenu has on his server (link he gave in the second post )
So that when somebody else uses his script he gets added benefits to CSS Retention.
I will try updating the wiki. Never done it before
@DenisChenu, Can I use your method to update the wiki?
Last edit: 8 years 8 hours ago by deejroamer. Reason: Asked DenisChenu for permission
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13911
- Thank you received: 2548
8 years 2 hours ago #133258
by DenisChenu
I have to put it in git(hub|.framasoft|lab) with a clear MIT licence, when i do : i put the link here. I search for a way to do it in plugin (without need to deactivate XSS for user).
Denis
PS: MIT licence : keep copyright (mine and yours).
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 Delete select options (dropdown list) via java script
The script is free like a speech (and like a beer). Then yes , no problem.deejroamer wrote: @DenisChenu, Can I use your method to update the wiki?
I have to put it in git(hub|.framasoft|lab) with a clear MIT licence, when i do : i put the link here. I search for a way to do it in plugin (without need to deactivate XSS for user).
Denis
PS: MIT licence : keep copyright (mine and yours).
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.