I've prepopulated a post_category field with a bunch of values that I retrieved from the database. Unlike regular drop-down fields, a category drop-down is a real key-value pair (category-id => category name).
The get_select_choices method in common.php doesn't seem to handle this correctly: the way it is set up now it'll ignore the isSelected value is there is an incoming value (which works, but confused the heck out of me as I was trying to insert an isSelected field).
Next, the code checks to see if the incoming value matches the option label:
$selected = ($value == $choice["text"]) ? "selected='selected'" : "";
For common drop-down fields this is fine as the value is equal to the text, but for categories this fails as the option's value is different from the label. I believe the code should read:
'$selected = ($value == $choice["value"]) ? "selected='selected'" : "";
It works for me. Can you confirm my solution and if so, include it in the next release?
Thanks!
Bart