If someone has a problem with htmlform ext where <option>‘s are generated from related object list but value’s are not id’s but just sequential iterator values like 0,1,2,3 - solution is to change one line in _options function (near line 617 or smth like that):
// doesn't work $a = array('value' => $opt);
$a = array('value' => $label->id);Disclaimer: i think there might be some unexpected collisions with this since _options is user elsewhere, but it works for me for now.