Re: Disable default selection on 'autocomplete' mform element? (single select) by Jakub Kleban - Friday, 16 July 2021, 11:53 PM Number of replies: 1 $autocomplete = $mform->addElement('autocomplete', 'id', 'label', array('a','b'), $options); $autocomplete->setValue(''); Average of ratings: - Permalink Show parent Reply In reply to Jakub Kleban Re: Disable default selection on 'autocomplete' mform element? (single select) by Евгений Мамаев - Monday, 4 July 2022, 3:23 PM 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'; ......... Average of ratings: - Permalink Show parent Reply
In reply to Jakub Kleban Re: Disable default selection on 'autocomplete' mform element? (single select) by Евгений Мамаев - Monday, 4 July 2022, 3:23 PM 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'; ......... Average of ratings: - Permalink Show parent Reply