how to reference the comment text of a list-with-comment question

Mehr
1 Monat 3 Tage her #167657 von HBanayoti
HBanayoti erstellte das Thema how to reference the comment text of a list-with-comment question
Hi All,

This may be very basic or I just can't see it.

I'm trying to find out how to reference two things:
1) the comment text of a list-with-comment question; e.g. Qcode.comment.shown?
2) the help text associated with a question; e.g. Qcode.help.shown?

Your help would be much appreciated.

Thanks

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 3 Tage her #167658 von Joffm
Joffm antwortete auf das Thema: how to reference the comment text of a list-with-comment question
Hi,

my question is: Whar do you want to do?
Do you want to display the entered text in the comment field in a later question?
Do you want to change the displayed text of the comment field?
E.g:
<script>
$(function() {
$("#question{QID} .comment label").text("This is my new text for comments");
});
</script>

Do you want to display the help text in a later question?
Do you want to change the displayed help text dynamically?

And - as usual: Which version of LS?

Kind regards
Joffm

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 3 Tage her #167660 von HBanayoti
HBanayoti antwortete auf das Thema: how to reference the comment text of a list-with-comment question
Hi Joffm,

Thanks for your reply.

1) I want to display the entered text in the comment field in a later question.
2) I want to display the help text in a later question?

My version LS is version 3.7.0

Thanks in advance

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 3 Tage her #167667 von Joffm
Joffm antwortete auf das Thema: how to reference the comment text of a list-with-comment question
Hi,
1. the entered text in the comment field.
That's easy:
Create a survey with a comment, activate, enter a few respones, and have a look at the answer table.
Here you see the code, you have to use.


Here you see, that you have to use "Q0_comment":


2. the help text. Why do you want to get this? You enter this text when adding a question. So you just can copy it into other questions. This text doesn't change.
Or what is your reason to do this?

Best you send a sample (*.lss) that we see better

Joffm
Anhang:
Folgende Benutzer bedankten sich: HBanayoti

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 1 Tag her #167710 von HBanayoti
HBanayoti antwortete auf das Thema: how to reference the comment text of a list-with-comment question
Thanks Joffm,

I successfully implemented solution [1] and it worked fine.

For solution [2], referencing the 'Help' text entered, I need that because it contains important descriptive survey content which I would like to re-display later in a text-display question which provides a final summary report. Aesthetically it looks better to include that content in 'Help' field of the question rather the body of the question itself. Nonetheless, for the time being I have shifted the content back into the body of the question as it seems to be the only way to achieve what I'm looking for. However, I think this should make an important feature request for future releases of LS. It should certainly be something fairly easy to develop.

Rgds
Hani

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 1 Tag her - 1 Monat 1 Tag her #167713 von Joffm
Joffm antwortete auf das Thema: how to reference the comment text of a list-with-comment question
Hi,
there are really other more important things.

This (help)text is not dynamic, it is static. It's is something you enter in the "help text" box of each question (or leave it blank)
So it shouldn't be too difficult to copy this text to another place - your summary.

Different from the dynamic text entered by the respondent as the comment. Here you need a reference.

Joffm

P.S.
You could try to retrieve the help text by an ajax call to search the table "[LS]_questions" for the field "help" depending on the questionID.
There is a small example. Just search the forum for "ajax call".
Letzte Änderung: 1 Monat 1 Tag her von Joffm.
Folgende Benutzer bedankten sich: HBanayoti

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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