by Stan Montgomery.
Hi all,
I realise this is an older post, but this answer may be useful.
I've worked out a way to do this while maintaining the data by making the field hidden.
By commenting out this :
$choices = array();
$choices['0'] = get_string('textformat');
$choices['1'] = get_string('htmlformat');
$mform->addElement('select', 'mailformat', get_string('emailformat'), $choices);
$mform->setDefault('mailformat', 1);
and adding this:
// hidden field
$mform->addElement('hidden', 'mailformat');
$mform->setDefault('mailformat', 1);
$mform->setType('mailformat', PARAM_INT);
in the user/editlib.php file, it turns the dropdown into a hidden field.
I repeated this to all the fields I didn't want displayed.
Stanzahero