'name', 'value' => $vars['entity']->name)); ?>
0) {
foreach ($profile_fields as $shortname => $valtype) {
$metadata = elgg_get_metadata(array(
'guid' => $vars['entity']->guid,
'metadata_name' => $shortname,
'limit' => false
));
if ($metadata) {
if (is_array($metadata)) {
$value = '';
foreach ($metadata as $md) {
if (!empty($value)) {
$value .= ', ';
}
$value .= $md->value;
$access_id = $md->access_id;
}
} else {
$value = $metadata->value;
$access_id = $metadata->access_id;
}
} else {
$value = '';
$access_id = ACCESS_DEFAULT;
}
//sticky form values take precedence over saved ones
if (isset($stickyValues[$shortname])) {
$value = $stickyValues[$shortname];
}
if (isset($stickyValues['accesslevel'][$shortname])) {
$access_id = $stickyValues['accesslevel'][$shortname];
}
?>
$shortname,
'value' => $value,
);
echo elgg_view("input/{$valtype}", $params);
$params = array(
'name' => "accesslevel[$shortname]",
'value' => $access_id,
);
echo elgg_view('input/access', $params);
?>