Autocomplete Value not being Submitted

  • hyperx
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
9 Anni 8 Mesi fa #2214 da hyperx
Autocomplete Value not being Submitted è stato creato da hyperx
I noticed that the Value of the Autocomplete field is not being submitted when you type the value and hit enter. For the value to be submitted the value has to be selected, is there a way to alter this behaviour?

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
9 Anni 8 Mesi fa #2215 da andrea_4g
Risposta da andrea_4g al topic Autocomplete Value not being Submitted
The autocomplete field needs a value to be selected. So, when the value is displayed you can use the UP and DOWN arrow keys to highlight the value and then press Enter to submit.

There's a little tweak that will force the first value of the list to be selected (and then submitted with enter).
Edit file : modules/mod_cpsearch/helper.php
Chanche lines 428-430 from
Code:
jQuery(document).ready(function (){ jQuery( "#ac_'.$fId.'" ).autocomplete({ source: function(request, response) {
to:
Code:
jQuery(document).ready(function (){ jQuery( "#ac_'.$fId.'" ).autocomplete({ autoFocus: true, source: function(request, response) {

Note: this modification will be overwritten when you upgrade Custom Properties.

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.150 secondi