Hi,
I want to add a custom field that contains the list of all mantis users, i have added this code in custom_field_api, the users appear normaly in the page but when i select a one user or more i have a message error:
case CUSTOM_FIELD_TYPE_MANTISUSER:
$t_checked_values = explode( '|', $t_custom_field_value );
$p_field_def['possible_values'] = "";
$uquery = "SELECT realname FROM mantis_user_table WHERE enabled = 1 AND realname <> '' ORDER by realname DESC";
$result = db_query($uquery);
$user_count = db_num_rows( $result );
while ($row = db_fetch_array($result)){
echo '<input type="checkbox" name="custom_field_' . $t_id . '[]"';
if( in_array( $row['realname'], $t_checked_values ) ) {
echo ' value="' . $row['realname'] . '" checked> ' . $row['realname'] . ' ';
} else {
echo ' value="' . $row['realname'] . '"> ' . $row['realname'] . ' ';
}
}
break ;
}
can you help me !
UserList CustomField
Moderators: Developer, Contributor
-
- Posts: 49
- Joined: 24 Mar 2015, 22:41
UserList CustomField
- Attachments
-
- Sans titre1.jpg (57.47 KiB) Viewed 5253 times
-
- Sans titre.jpg (49.42 KiB) Viewed 5253 times
Re: UserList CustomField
You should not change any code of MantisBT for it but implement it the documented wayMmarouane89 wrote:i have added this code in custom_field_api
https://www.mantisbt.org/docs/master-1. ... DS.DYNAMIC