jQuery Autocomplete

More
3 years 5 months ago #106580 by g3guy
g3guy replied the topic: jQuery Autocomplete
Denis, Tony - thank you for all your help!

This section now works like a charm! (finally tested)

If I have any nit picks it would be that the options "jump" when selected. So as soon as I select my first option, both options shift to the right.

Please Log in to join the conversation.

More
3 years 5 months ago #107153 by lfanfoni
lfanfoni replied the topic: jQuery Autocomplete
This script is a fantastic solution! Expecially for italians users...
In Italy we have 110 Province and 8.057 Comuni (cities).
I've adapted the script in order to have a unique ID for cities in each province (3 chars instead 2), beacause in many cases we have more than 100 cities for province.
In this example the lenght of answer code for both scales is fixed at 5 characters (maximum for anser code). First two characters is abbreviation of province (RM is Province of Rome). Lasts 3 characters is the unique ID for both scales, expecially for the Cities, so the maximum number of cities for province now is 999.
I've modified the scritp in the "Substring" arguments. For example:
Old: substring(0, $(this).val().length - 2)
New: substring(0, $(this).val().length - 3)
I attach a sample of this solution, with the modified script (I also commented).
I ask to Denis and Tony the permission to publish the complete solution with the modified script in the italian forum.
Thanks a lot for this discussion/solution.
Luciano

File Attachment:

File Name: dual_scale...char.lsq
File Size:22 KB
Attachments:

Please Log in to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #107158 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete
The script don't have actually a licence ?

MIT surely.... (then yes ... you can copy /paste / adapt / etc ...

And yes : MIT at starting : gitorious.org/ls-selectfilter/ls-selectf...d:selectfilter.js#L3

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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 years 5 months ago by DenisChenu.
The following user(s) said Thank You: lfanfoni

Please Log in to join the conversation.

More
3 years 5 months ago #107162 by lfanfoni
lfanfoni replied the topic: jQuery Autocomplete
I've added a comment to documentate my modify. This:
/*
Modified Version by Luciano Fanfoni 04/04/2014
Fixed Lenght of both Answer Code (scale 1 & 2): 5
Firsts 2 chars used to filter. Lasts 3 chars used to identify unically options of scale2
Example of Modified code:
Old: substring(0, $(this).val().length - 2)
New: substring(0, $(this).val().length - 3)


Distributed under MIT licence
*/

Please Log in to join the conversation.

More
2 years 3 months ago #120697 by mascarpone
mascarpone replied the topic: jQuery Autocomplete
Hi Guys,

Back on this thread which I struggle a bit to understand. I have 2 questions here:

1. is there somewhere a summary of how this can be tackled (Denis maybe)? as there seem to be different versions, with bug fixes, etc. Any sort of a "final word" on this?

2. anything "more robust" planned along those lines in future releases?

Cheers!

Please Log in to join the conversation.

More
2 years 3 months ago #120701 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete
Hi,

Already have a 'not finalized plugin', not public actually.

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 3 months ago #120789 by mascarpone
mascarpone replied the topic: jQuery Autocomplete
Hmmmmm :woohoo: that's a teaser...

A planned release date - or some hints on the plugin itself?

Please Log in to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #120792 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete

mas_carpone wrote: A planned release date

When i have time to test and fix some issue, and to do a clean system and doc.

some hints on the plugin itself?

testing.sondages.pro/limesurvey/529393?newtest=Y

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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 2 years 3 months ago by DenisChenu.

Please Log in to join the conversation.

More
2 years 3 months ago #120799 by mascarpone
mascarpone replied the topic: jQuery Autocomplete
The "search" feature is very promising!

Is it still envisaged to have an option along the lines of cascading dropdown lists? (Country, Province, District, etc.)

Please Log in to join the conversation.

More
2 years 3 months ago #120800 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete

mas_carpone wrote: The "search" feature is very promising!

? select use autocomplete, then you can filter too. The 3 exampe have "search" option.

mas_carpone wrote: Is it still envisaged to have an option along the lines of cascading dropdown lists? (Country, Province, District, etc.)

Can be done using category in dropdown , but surely some work more.

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
11 months 4 weeks ago - 11 months 4 weeks ago #142126 by mascarpone
mascarpone replied the topic: jQuery Autocomplete
Hi Folks,

Sorry to get back to this again but I can't seem to fix this myself... could anyone here please help in creating this kind of cascading dropdowns for a specific location (I'm currently working in North East Nigeria and would need it here for the region)?

Would be very much appreciated...

Searching for more I have also found this: www.limesurvey.org/forum/design-issues/8...wn-question&start=15

But could still do with some help guys... :blush:
Last Edit: 11 months 4 weeks ago by mascarpone.

Please Log in to join the conversation.

More
11 months 4 weeks ago #142134 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete

mas_carpone wrote: Hi Folks,

Sorry to get back to this again but I can't seem to fix this myself... could anyone here please help in creating this kind of cascading dropdowns for a specific location (I'm currently working in North East Nigeria and would need it here for the region)?

Hi ,

This is not in gistmaps.itos.uga.edu/arcgis/rest/services/COD_External/ ? If yes you can use github.com/WorldHealthOrganization/ls-callApiArcGIS

Else, if you have somethink like zipcode / town need :
You can download : framagit.org/SondagePro-LimeSurvey-plugi...lob/master/README.md

Just update insee_cp_ville.csv file , maybe some other little adaptation.

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
11 months 3 weeks ago - 11 months 3 weeks ago #142145 by tpartner
tpartner replied the topic: jQuery Autocomplete
A note on Denis' suggested plugin - do not edit the CSV file with MS Excel - it will probably break it, particularly with special characters - use something like LibreOffice Calc.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 11 months 3 weeks ago by tpartner.

Please Log in to join the conversation.

More
11 months 3 weeks ago - 11 months 3 weeks ago #142160 by mascarpone
mascarpone replied the topic: jQuery Autocomplete
Thanks Denis and tpartner!

It is not the town/zipcode kind of feature I need and yes Denis, the data for Nigeria is not available through the web service we normally use for geographical standard. I have the standard breakdown of states, districts, sub districts as an excel this time... and would like to serve those in my survey so that only the relelvant answers (depending on the previous selection) show.

Autocomplete is not ideal unfortunately as most users entering data do not know the region (they are mostly staff of NGOs currently working in the zone)

Thanks for your help guys!

(FYI: we are using LS in this case to try and map out health services delivered to populations in the war affected area and identify gaps to be addressed)
Last Edit: 11 months 3 weeks ago by mascarpone.

Please Log in to join the conversation.

More
11 months 2 weeks ago #142508 by DenisChenu
DenisChenu replied the topic: jQuery Autocomplete
Think best is to update callApiArcGIS to use geonames hierarchy API.

See : vikku.info/programming/geodata/geonames-...e-city-hierarchy.htm for an example

Added on mly todo list : github.com/SondagesPro/ls-callApiArcGIS/issues/1

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now