Limiting maxlength of textarea

Limiting maxlength of textarea

by Katelyn Harris -
Number of replies: 0

Hello,

I am currently configuring a registration page which includes textinput (small textbox) and textarea (large textbox) fields. I am able to set the maxlength (maximum number of characters a user may enter) for the textinput fields, but I do not see an option within the Moodle admin interface to limit the maxlength of the textarea fields. I have searched through the code with no luck.

Does anyone know how to do this?

EDIT: I am aware that within signup_form.php, you're able to set the maxlength of some fields:

$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="25"');
$mform->setType('email', PARAM_RAW_TRIMMED);
$mform->addRule('email', get_string('missingemail'), 'required', null, 'client');

However, the textarea fields I have added are custom fields and do not appear in the code, so this is not an option for me.

Thanks!

Average of ratings: -