$items[$element]['rules'] = array('maxlength' => 65536); } if ($type == 'textarea') { $items[$element]['rows'] = 4; $items[$element]['cols'] = 50; } if ($type == 'text') { $items[$element]['size'] = 30; } if ($element == 'country') { $countries = getoptions_country(); $items[$element]['options'] = array('' => get_string('nocountryselected')) + $countries; $items[$element]['defaultvalue'] = get_config('country'); } if ($element == 'socialprofile') { $items[$element] = ArtefactTypeSocialprofile::render_profile_element(); } if (get_helpfile_location('artefact', 'internal', 'profileform', $element)) { $items[$element]['help'] = true; } if (isset($profilefields[$element])) { $items[$element]['defaultvalue'] = $profilefields[$element]; } if (isset($element_required[$element])) { $items[$element]['rules']['required'] = true; } if (isset($lockedfields[$element]) && !$USER->get('admin')) { $items[$element]['disabled'] = true; if ($element == 'email') { $items[$element]['help'] = false; }