Hello all,
I created e select tag with the specific call $mform->addElement('select', 'level', get_string('level'), $select_array); and I obtain for example:
<select name="level" id="id_level">
<option value="a">A</option>
<option value="b">B</option>
<option value="c">C</option>
<option value="d">D</option>
</select>
Everything work fine, but I need to select one option depending of the value, like this:
<select name="level" id="id_level">
<option value="a">A</option> <option value="b">B</option> <option value="c" selected="selected">C</option>
<option value="d">D</option>
</select>
How can I do that?!?
Thanks to all!!!