Array question with answers in dropdown boxes

Mehr
3 Jahre 1 Monat her #137953 von DenisChenu

Juanoche schrieb:

DenisChenu schrieb: Hi,

Actually for such solution : you have a plugin : www.limesurvey.org/forum/plugins/104019-...ith-dropdwon-or-mask

It work on a 2.50 last time i tested.


DenisChenu I had already seen that plugin but unfortunately I get a 500 error on my server when I install it and try to acces survey settings / Plugins

See github.com/SondagesPro/LS-arrayTextAdapt...suecomment-223626556

I can not reproduce the issue : then need tester.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 9 Monate her #143401 von ramzus
Hi tpartner,

I used this solution and it was very helpful, but now i want to show the selected dropdown text in the next question but the Limesurvey replacement field properties shown only the code selected.

Thanks

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 9 Monate her #143406 von tpartner
Err...which solution. There are many in this thread, some of which are years old. It may be better to start a new thread describing exactly what you did and the details of your LimeSurvey environment.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 9 Monate her #143413 von ramzus
The solution for the array question with text answers in a dropdown box i want to show the selected dropdown text in the next question but the Limesurvey replacement field properties shown only the code selected.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
        $('#questionQQ .answer_cell_001 option[value=1]').text('No recurro');
        $('#questionQQ .answer_cell_001 option[value=2]').text('Arocena Gustavo');
        $('#questionQQ .answer_cell_001 option[value=3]').text('Aspra Manuel');
        $('#questionQQ .answer_cell_001 option[value=4]').text('Bravo Ricardo');
        $('#questionQQ .answer_cell_001 option[value=5]').text('Zalazar Martin');
 
        $('#questionQQ .answer_cell_002 option[value=1]').text('No recurro');
        $('#questionQQ .answer_cell_002 option[value=2]').text('Bravo Ricardo');
        $('#questionQQ .answer_cell_002 option[value=3]').text('Fernandez Flavio');
        $('#questionQQ .answer_cell_002 option[value=4]').text('Zalazar Martin');
        $('#questionQQ .answer_cell_002 option[value=5]').text('').hide();
 
    });

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 9 Monate her #143424 von tpartner
In that case, you would either need to use Expression Manager to pipe in the text depending on the code or use Denis' arrayTextAdapt plugin .

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 9 Monate her #143436 von ramzus
Thank you very much, i will try this

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170145 von b1994mi
Hi,

I have been using tpartner's javascript for providing dropdown options on array (texts). But, now I need something a bit specific. I need to make certain row readonly and force an answer that is different from the options provided by the dropdown.

What the respondents will think is that this readonly inputs are fixed because they need to use MRT for that journey.

Here is the mockup of what I need:
Warnung: Spoiler! [ Zum Anzeigen klicken ]


I have attached my survey file with only the corresponding question group.
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170227 von tpartner
I don't think it's possible with a single array question as your "MRT" row is a moving target depending on the answers to the first two questions. I would do it with three array questions, styled with CSS to appear as one.

- One array for modes getting to MRT
- One (readonly) array for MRT
- One array for modes getting from MRT

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170232 von b1994mi
Hi,

I have found this thread and it is about two radio button question merged into one.

How to call the previous question? (assuming that I place the MRT in the middle)

Or is there any exact thread you can refer? It is a bit too complicated for me to implement the CSS :(

Thank you in advance.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170236 von tpartner
It would be far easier to do it with CSS but the details would depend on your LimeSurvey version and theme.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170276 von b1994mi
Hi,

My Limesurvey version is Version 3.6.2+180406 and the theme is fruity. Is there any thing that I should notice if I ever needed the workaround to be done on another version and theme?

Thank you in advance.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170278 von tpartner
- Assign Q1 a CSS class "merge-bottom".
- Assign Q2 CSS classes "merge-top merge-bottom".
- Assign Q3 a CSS class "merge-top".

Add something like this to custom.css in your extended theme:

.question-container.merge-bottom {
    margin-bottom: 0;
    border-bottom: 0 none;
}
 
.question-container.merge-bottom .answer-container {
    padding-bottom: 0;
}
 
.question-container.merge-top,
.question-container.merge-top .subquestion-list,
.question-container.merge-top .subquestion-list tbody tr:first-child > * {
    border-top: 0 none;
}
 
.question-container.merge-top .answer-container {
    padding-top: 0;
}
 
.question-container.merge-top .question-title-container,
.question-container.merge-top .question-valid-container,
.question-container.merge-top .subquestion-list thead {
	display: none;
}



Regarding other themes - you would need to explore the HTML and CSS affecting the layout to determine what is required.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170411 von b1994mi
Hi,

Thank you, it worked. But, a new problem arises. I need to force input the array fields. :(

So far I have used:
{middle_1_SQ001="MRT"}
{middle_1_SQ002=20}
{middle_1_SQ003=8000}
to force input, but it did not work. How is so?

Here is what it looks like:
Warnung: Spoiler! [ Zum Anzeigen klicken ]


I have attached my survey file below.

Btw, I need to use 'for loop' to calculate time from one station to another and input in 'time (min)' for MRT. Should I just make a new thread or is there already a thread that asks the same question?
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170432 von tpartner
If you want to use Expression Manager to set answers, you must place those statements in equation type questions positioned after the array.

Having said that, you could use JavaScript to set the answers as you render the inputs readonly.

<script type="text/javascript" charset="utf-8">
	$(document).on('ready pjax:scriptcomplete',function(){
		$("#answer{SGQ}1_SQ001").val('MRT').trigger('keyup').prop("readonly",true);
		$("#answer{SGQ}1_SQ002").val(20).trigger('keyup').prop("readonly",true);
		$("#answer{SGQ}1_SQ003").val(8000).trigger('keyup').prop("readonly",true);
	});
</script>


Regarding your 'for loop' question - sorry, I have no idea what you are trying to do.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 1 Monat her #170438 von b1994mi
I see, I think this would be all that I need. I don't think the for loop is necessary anymore, so let's just forget it.

Thank you very much for your help. :)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha