I cleaned up the form field retrieval. This fixes the issue where `prevIndex` is specified but `prevValue` is not since that caused an NPE.