Autocomplete Form element

Autocomplete Form element

by Krishna Mohan Prasad -
Number of replies: 2

Hi,

I am using autocomplete element in my form to find and select data. Selected value can be cleared before submitting the form by clicking the cross beside of selected value but when I submit the form the selected values appears with that cross beside of them but now when click on them those values are not cleared. 

I have checked it moodle version 3.7 and 3.8 . I checked on windows OS and Linux OS as well. I have set cachejs to false in config file. I have checked moodle boost theme.

An screenshot is attached for reference.

Attachment Screenshot (355).png
Average of ratings: -
In reply to Krishna Mohan Prasad

Re: Autocomplete Form element

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Are you using formslib? I've more or less given up trying to manipulate that. It's wrapped up with (I assume a load of YUI stuff) that breaks any Javascript you try to add to manipulate the form.
In reply to Howard Miller

Re: Autocomplete Form element

by Krishna Mohan Prasad -
Yes i am using moodle formslib.
How i am fetching data : 
First when page loads all the department division and subdivision array are passes into auto-complete element.
Second when any department is selected i update the data of lower division and subdivisions using data fetched from webservice via transponse and processResults methods of auto-complete element.

The issue only occurs after form submission. After form submission if i select value then again they can be cleared, but after submission when the page loads no selected data can be cleared.

I did not find any issue in console.