Resonant neutron capture in Er and Hf