diff --git a/app/views/supporters/_form.slim b/app/views/supporters/_form.slim index 37d4383..bbef31e 100644 --- a/app/views/supporters/_form.slim +++ b/app/views/supporters/_form.slim @@ -22,9 +22,14 @@ javascript: $('#supporter_city').typeahead({ minLength: 2, - highlight: true, },{ - display: 'city', + limit: 20, + display: 'city', + templates: { + suggestion: function (data) { + return '

' + data.plz + ' - ' + data.city + '

'; + } + }, source: cities }).on('typeahead:selected', function(event, datum) { $("#supporter_zip").val(datum.plz); @@ -32,9 +37,14 @@ javascript: $('#supporter_zip').typeahead({ minLength: 2, - highlight: true, },{ + limit: 20, display: 'plz', + templates: { + suggestion: function (data) { + return '

' + data.plz + ' - ' + data.city + '

'; + } + }, source: cities }).on('typeahead:selected', function(event, datum) { $("#supporter_city").val(datum.city);