need some help .. $mform->addElement('select', ...);

need some help .. $mform->addElement('select', ...);

by vishnu narayanan -
Number of replies: 4

Hi I am new to moodle. I need some help regarding 'select' drop down. is there any attributes to make this drop drown box to fetch values on typing. I know by default it point to similar words if typed. what i want is to make the entire drop down box to displayed like a normal text box while typing, and display matching words dropping down below.

$select = $mform->addElement('select', 'profile_field_rslstate', 'State', $state);
$mform->addRule('profile_field_rslstate', get_string('required'), 'required', null, 'client');

Average of ratings: -
In reply to vishnu narayanan

Re: need some help .. $mform->addElement('select', ...);

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
In reply to Benjamin Ellis

Re: need some help .. $mform->addElement('select', ...);

by vishnu narayanan -
This is exactly what I needed. Thank you.
In reply to vishnu narayanan

Re: need some help .. $mform->addElement('select', ...);

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
No Problem, you welcome.

You said you are new to Moodle development so you should try and get more knowledge, which apart from the development pages here on moodle.org, there a couple of development books – see https://moodle.org/books including my book ‘Introduction to Moodle 3.9+ Plugin Development‘ (https://books2read.com/m39plugindevelopment) and a number of courses -Moodle Plugin Development Basics (https://moodle.com/news/learn-moodle-plugin-development/) (free), the MoodleBites for Developers Level 1 – expensive – (https://www.moodlebites.com/mod/page/view.php?id=24546) and a few short specific ones on Udemy (https://www.udemy.com/courses/search/?src=ukw&q=moodle+development).

Have fun!
Average of ratings: Useful (1)