Hello,
I would like to use an autocomplete field based on a list.
User should type the first characters in the field in order to get the first possibles occurencies in the given list.
Thanks a lot for your help
Best regards
Lionel
Thanks a lot for your answer !
🤔 do you think that it would be possible by using javascript like :
label my moodle db field and hide it as myfield for example
giving an autocompleting field thanks to javascript
filling "myfield" from the javascript autocompleted field
Might it could be possible ?
Hi Lionel,
Excellent idea! The standard autocomplete element is created with a template here https://github.com/moodle/moodle/blob/master/lib/form/templates/element-autocomplete.mustache. You can see where the javascript is loaded at the bottom. You should be able to copy that and replace placeholders with the correct css selector and other options.
Daniel