if (!defined("IN_FUSION")) { die("Access Denied"); }
if ($profile_method == "input") {
echo "<tr>n";
echo "<td class='tbl'>".$locale['uf_autonews_001'].":</td>n";
echo "<td class='tbl'><input type='checkbox' name='user_autonews' class='checkbox' ".(isset($user_data['user_autonews']) && $user_data['user_autonews'] == "1"? "checked='checked'": "")." /></td>n";
echo "</tr>n";
} elseif ($profile_method == "display") {
if ($user_data['user_autonews']) {
echo "<tr>n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['uf_autonews_001']."</td>n";
echo "<td align='right' class='tbl1'>".($user_data['user_autonews'] == "1" ? $locale['uf_autonews_002'] : $locale['uf_autonews_003'])."n";
echo "</td>n</tr>n";
}
} elseif ($profile_method == "validate_insert") {
$db_fields .= ", user_autonews";
$db_values .= (", '".(isset($_POST['user_autonews'])? 1 : 0)."'");
} elseif ($profile_method == "validate_update") {
$db_values .= (", user_autonews='".(isset($_POST['user_autonews'])? 1: 0)."'");
}
?>
defined('IN_FUSION') || exit;
if ($profile_method == "input") {
/*
* Field Value
* 0 No
* 1 Yes
*/
$autonews_options = [
0 => $locale['uf_autonews_no'],
1 => $locale['uf_autonews_yes'],
];
$input_type = 'form_checkbox';
} elseif ($profile_method == "display") {
defined('IN_FUSION') || exit;
if ($profile_method == "input") {
$options = [
'toggle' => TRUE,
] + $options;
$user_fields = form_checkbox('user_autonews', $locale['uf_autonews_001'], $field_value, $options);
}
if ($profile_method == "input") {
is for edit profile/register$profile_method == "display"
it will be in public profile = editable for allif ($profile_method == "input") {
, in user fields administration you can check this field as required and display it on register form as well.} elseif ($profile_method == "display") {
- This is content visible for all when you visit profile.Category Forum
User Fields - 9Labels
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions