Re: "Custom" Profile Fields are Weird
Reply #5 –
@scripple would you mind give a try to this changes and see if they work?
In sources/subs/Profile.subs.php:
));
$context['custom_fields'][] = array(
));
$context['custom_fields_required'] = $context['custom_fields_required'] || $row['show_reg'];
if ($area !== 'register' && ($value === '' || $value === 'no_default'))
{
continue;
}
$context['custom_fields'][] = array(
and, if you want to be picky (but it should make any difference), remove the line:
$context['custom_fields_required'] = $context['custom_fields_required'] || $row['show_reg'];
The idea is to change the behaviour so that:
1) if it is the registration form and the field is set to be shown, show it,
2) if it is not the registration form and the field is set not to have a default value, then hide it.
there may be some edge case I missed, not unusual, that's where your help comes in.