diff --git a/lang/en/admin.php b/lang/en/admin.php index cf5412838e3..4bdd1f9d9c6 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -1010,7 +1010,8 @@ $string['profilefieldispassword'] = 'Is this a password field?'; $string['profilefieldlink'] = 'Link'; $string['profilefieldlink_help'] = 'To transform the text into a link, enter a URL containing $$, where $$ will be replaced with the text. For example, to transform a Twitter ID to a link, enter https://twitter.com/$$.'; $string['profilefieldlinktarget'] = 'Link target'; -$string['profilefieldmaxlength'] = 'Maximum length'; +$string['profilefieldmaxlength'] = 'Character limit'; +$string['profilefieldmaxlength_help'] = 'To use this field in the setting \'Show user identity\', the limit must be 255 characters or less.'; $string['profilefieldrows'] = 'Rows'; $string['profilefields'] = 'User profile fields'; $string['profilefieldsize'] = 'Display size'; diff --git a/user/profile/field/text/define.class.php b/user/profile/field/text/define.class.php index 877debafe41..3e861955573 100644 --- a/user/profile/field/text/define.class.php +++ b/user/profile/field/text/define.class.php @@ -32,7 +32,8 @@ class profile_define_text extends profile_define_base { /** * Add elements for creating/editing a text profile field. - * @param moodleform $form + * + * @param MoodleQuickForm $form */ public function define_form_specific($form) { // Default data. @@ -48,6 +49,7 @@ class profile_define_text extends profile_define_base { $form->addElement('text', 'param2', get_string('profilefieldmaxlength', 'admin'), 'size="6"'); $form->setDefault('param2', 2048); $form->setType('param2', PARAM_INT); + $form->addHelpButton('param2', 'profilefieldmaxlength', 'admin'); // Param 3 for text type detemines if this is a password field or not. $form->addElement('selectyesno', 'param3', get_string('profilefieldispassword', 'admin'));