Disable default selection on 'autocomplete' mform element? (single select)

Re: Disable default selection on 'autocomplete' mform element? (single select)

by Jakub Kleban -
Number of replies: 1
$autocomplete = $mform->addElement('autocomplete', 'id', 'label', array('a','b'), $options);
$autocomplete->setValue('');
In reply to Jakub Kleban

Re: Disable default selection on 'autocomplete' mform element? (single select)

by Евгений Мамаев -
Picture of Plugin developers
For me the following is a solution:
Create an array of values for autocomplete and set the first element with zero index.
$values[0] = '';
$values[1] = 'value1';
$values[2] = 'value2';
.........