- Messaggi: 6
- Ringraziamenti ricevuti 0
Autocomplete Field Search entiry string,
- hyperx
- Autore della discussione
- Offline
- Nuovo Utente
Less
Di più
9 Anni 9 Mesi fa #2185
da hyperx
Autocomplete Field Search entiry string, è stato creato da hyperx
Hello,
currently the Autocompletion Field works only as an autocompletion on the first letter so if you start with a S, all Tags starting with a S are shown.
So lets say i have a tag "See Example" it will show up when i start to type "see", however i would also like for it to show up when i start to type "example"
Is it possible to change this in th JS File and if so where?
To adjust the minLength, so the autocomplete funtion doesn't start after the first letter is probably easily changed by changing the number on Line 26 or not?
currently the Autocompletion Field works only as an autocompletion on the first letter so if you start with a S, all Tags starting with a S are shown.
So lets say i have a tag "See Example" it will show up when i start to type "see", however i would also like for it to show up when i start to type "example"
Is it possible to change this in th JS File and if so where?
To adjust the minLength, so the autocomplete funtion doesn't start after the first letter is probably easily changed by changing the number on Line 26 or not?
Si prega Accesso o Crea un account a partecipare alla conversazione.
- andrea_4g
- Offline
- Amministratore
Less
Di più
- Messaggi: 1122
- Ringraziamenti ricevuti 163
9 Anni 9 Mesi fa #2186
da andrea_4g
Risposta da andrea_4g al topic Autocomplete Field Search entiry string,
== minLength ==
You can change the minLength value by editing:
modules/mod_cpsearch/helper.php
and change lines 428-430 from
to:
You can also do that without altering the module non-overridable code by adding the following js script to your page:
where ac_cp_field_96_1 is the id of your autocomplete field and 2 is the number of chars to be typed.
== search in the middle ==
You have to alter Custom Properties core code (and that will leave you with a custom version of CP that will be overwritten upon future upgrades, and so on and so forth ...)
Edit file components/com_customproperties/controller.php
Change line 224 from:
to
You can change the minLength value by editing:
modules/mod_cpsearch/helper.php
and change lines 428-430 from
Code:
jQuery(document).ready(function (){
jQuery( "#ac_'.$fId.'" ).autocomplete({
source: function(request, response) {
...
Code:
jQuery(document).ready(function (){
jQuery( "#ac_'.$fId.'" ).autocomplete({
minLength: 2,
source: function(request, response) {
...
You can also do that without altering the module non-overridable code by adding the following js script to your page:
Code:
jQuery(document).ready(function (){
jQuery( "#ac_cp_field_96_1" ).autocomplete("option", "minLength", 2);
});
== search in the middle ==
You have to alter Custom Properties core code (and that will leave you with a custom version of CP that will be overwritten upon future upgrades, and so on and so forth ...)
Edit file components/com_customproperties/controller.php
Change line 224 from:
Code:
"AND v.label LIKE '$value%' " .
Code:
"AND v.label LIKE '%$value%' " .
I seguenti utenti hanno detto grazie : hyperx
Si prega Accesso o Crea un account a partecipare alla conversazione.
Tempo creazione pagina: 0.121 secondi