Hey!
I have the following problem:
I'm using several custom fields of type enumeration.
The fields are displayed in submit and update mode of the bug.
When i select a value and sumbit it. The right value is stored in the db.
When i enter the update mode of the bug. Always the first value of the enumeration is displayed. Not that one stored in the db.
How can i fix this?
greez kerthi
Custom Fields (enumeration) Problem
Moderators: Developer, Contributor
Can noone help with this?
The statement that should ensure that the value is selected (lines 1174-1180 in custom_field_api):
foreach( $t_values as $t_option ) {
if( in_array( $t_option, $t_selected_values ) ) {
echo '<option value="' . $t_option . '" selected> ' . $t_option . '</option>';
} else {
echo '<option value="' . $t_option . '">' . $t_option . '</option>';
}
}
if( in_array( $t_option, $t_selected_values ) ) sheems never to be true. Because no enum never gets a selected val even with a selection stored in the db.
kerthi
The statement that should ensure that the value is selected (lines 1174-1180 in custom_field_api):
foreach( $t_values as $t_option ) {
if( in_array( $t_option, $t_selected_values ) ) {
echo '<option value="' . $t_option . '" selected> ' . $t_option . '</option>';
} else {
echo '<option value="' . $t_option . '">' . $t_option . '</option>';
}
}
if( in_array( $t_option, $t_selected_values ) ) sheems never to be true. Because no enum never gets a selected val even with a selection stored in the db.
kerthi