Skip to content
Advertisement

how to pass the selected option as value in moodle select

i want to pass the options as values : here is my code.

JavaScript

If i use this means it is looking like below :

JavaScript

what i want is the exact value will be pass in to the option values. how to get that

Advertisement

Answer

You can simplify this with the get records menu functions.

https://docs.moodle.org/dev/Data_manipulation_API#get_records_menu

JavaScript

To pass the selected value, you need to pass the value to the form.

https://docs.moodle.org/dev/Form_API#Usage

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement