Editor autoComplete field cannot be disabled
Editor autoComplete field cannot be disabled
Link to test case: http://live.datatables.net/mudejitu/1/edit
Debugger code (debug.datatables.net): N/A
Error messages shown: N/A
Description of problem:
When an editor field is set to the autoComplete type, you cannot disable it. Well, technically, it is disabled (as the autocomplete no longer works) but the field is editable. Check out test case above.
Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Thanks for the test case. Are you saying you want autoComplete disabled, or the field to be read-only? If read-only, you can use
field().disable()
. I got a bit lost there.Colin
Thanks Colin. As you can see from the test case, the field is disabled:
Which prevents the autocomplete from working, but does not prevent the user from entering in text in the field as seen here:
I would assume that disabling an autoComplete field type, it would essentially become read only, which is not the case.
Ah, I see, you need to add the code to disable the element too - the current option only disables the autocomplete functionality, if you add this to the code it does the trick (you'll also need the opposite in the
enable
section):See updated example here: http://live.datatables.net/mudejitu/3/edit
Colin
Genius! Thank you Colin.