Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: A pulldown list of states for use within multiple short text

A pulldown list of states for use within multiple short text 2 years 6 months ago #71755

  • miradoro
  • miradoro's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Karma: 0
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
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71756

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Rather than using multiple short text, why not create a list drop-down and populate it with the states label set?
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71765

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6228
  • Thank you received: 793
  • Karma: 238
And for a input:text, you have a workaround:
docs.limesurvey.org/Workarounds%3A+Manip...wers_for_text_inputs

:)
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71780

  • miradoro
  • miradoro's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Karma: 0
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 ?
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71787

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5301
  • Thank you received: 291
  • Karma: 247
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)limesurvey.org'"
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71791

  • miradoro
  • miradoro's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Karma: 0
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
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71809

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5301
  • Thank you received: 291
  • Karma: 247
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)limesurvey.org'"
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71982

  • miradoro
  • miradoro's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Karma: 0
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">
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71983

  • miradoro
  • miradoro's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 92
  • Karma: 0
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>
The administrator has disabled public write access.

Re: A pulldown list of states for use within multiple short text 2 years 6 months ago #71991

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6228
  • Thank you received: 793
  • Karma: 238
var q1ID = 115;
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.140 seconds
Donation Image