Check out the LimeSurvey source code on GitHub!

A pulldown list of states for use within multiple short text

More
5 years 1 month ago #71755 by miradoro
Hi

I am using multiple short text to collect personal information

One of my options is 'State'

is there a way i can use a pulldown list of states for within multiple short text?

The URL is: 38194X3X115SQ008

Please advice

Please Log in to join the conversation.

More
5 years 1 month ago #71756 by TMSWhite
Rather than using multiple short text, why not create a list drop-down and populate it with the states label set?

Please Log in to join the conversation.

More
5 years 1 month ago #71765 by DenisChenu
And for a input:text, you have a workaround:
docs.limesurvey.org/Workarounds%3A+Manip...wers_for_text_inputs

:)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
5 years 1 month ago #71780 by miradoro
well multiple short text allow me to have the text field next to the text
while the other options have the text field below

Can i use the workaround for 38194X3X115SQ008 ?

Please Log in to join the conversation.

More
5 years 1 month ago #71787 by Mazi
Please have a look at the workaround linked above.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 month ago #71791 by miradoro
the Demo shows i have to use 'ID'....if i am using multiple short text and state has as code 'state' i can use the same code?

Please advice

Please Log in to join the conversation.

More
5 years 1 month ago #71809 by Mazi
mirador, please install Firefox add-on "Firebug". It gives you the HTML ID for each field of a survey when clicking on it and should help you much.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 month ago #71982 by miradoro
hi

i get this error from google chrome

Uncaught SyntaxError: Unexpected token ILLEGAL

is it because my states field is part of a multiple short text?

This is the code
<input class="text " type="text" size="20" name="38194X3X115state" id="answer38194X3X115state" value="" onkeyup="noop_checkconditions(this.value, this.name, this.type);" maxlength="255">

Please Log in to join the conversation.

More
5 years 1 month ago #71983 by miradoro
the code for the multiple short question is
<div id="question115" class="multiple-short-txt">

and this is what i used on startgroup.pstpl

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

var q1ID = answer38194X3X115state;

var states = "Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,
District of Columbia,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,
Louisiana,Maine,Montana,Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,
North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Maryland,Massachusetts,Michigan,
Minnesota,Mississippi,Missouri,Pennsylvania,Rhode Island,South Carolina,South Dakota,
Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming".split(',');

$('#question'+q1ID+' input.text').autocomplete(states, {
matchContains: true,
minChars: 0
});

});
</script>

Please Log in to join the conversation.

More
5 years 1 month ago #71991 by DenisChenu
var q1ID = 115;

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
5 years 1 month ago #72060 by miradoro
i still get

Uncaught SyntaxError: Unexpected token ILLEGAL

Please Log in to join the conversation.

More
5 years 1 month ago #72065 by DenisChenu
Can you send us a test link ?

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
5 years 1 month ago #72066 by miradoro
i see 2 new errors

1) Uncaught SyntaxError: Unexpected token < @

<script type="text/javascript" src="myserver/scripts/survey_runtime.js"></script>

and

2) Uncaught ReferenceError: std_onsubmit_handler is not defined @

document.limesurvey.onsubmit = std_onsubmit_handler;

Please Log in to join the conversation.

More
5 years 1 month ago #72172 by miradoro
can you do a sample within multiple short text type?

Please Log in to join the conversation.

More
5 years 1 month ago #72274 by DenisChenu

Shnoulle wrote: Can you send us a test link ?

Denis


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form